httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m h <>
Subject [users@httpd] Auditing apache installations
Date Tue, 05 Oct 2004 17:13:14 GMT

I'm writing a script that will do the following:

* Tell you what versions of apache you have installed
* Tell you what port they are running on
* Tell you if they are actually running
* Run on most flavors of unix (and windows hopefully)

The idea is that a sys admin can take the tool and run it on their
machines to audit what they have installed.  I have a simple version
right now (running on linux only), but was wondering if I could get
some advice from the list here.

It is pretty trivial to just query the package manager (rpm, apt) for
the packages that are installed, but what if apache was installed from
source (or some other tool such as the apache toolbox) and placed in a
nonstandard location?  How do you know where to look for the httpd
binary?  (ie will it be in /usr, /opt, ...?)  Where is it's
corresponding conf file?

My current solution relies on netstat (see whats running on port 80),
slocate (find httpd binaries) , and strings (find path of conf file in
the httpd binary).  This seems a little fragile (and will need to be
changed to run on windows, unless I require cygwin).  Here are some
issues: what if apache isn't running on port 80, or what if it is not
running and there are four different httpd versions on the filesystem?
 How do you know which one the user is using?

If anyone has any advice, I'd like to hear it.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message