httpd-users mailing list archives

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

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.

thanks

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message