Go to solution
Kyle D. Harris
Regular Advisor


Good Morning-
Can anybody tell me of a command that will tell me which version of apache i'm running. Also, can somebody describe what apache "stand alone version" is? Thanks a lot!

Paulo A G Fessel
Trusted Contributor

Re: apache

You can ever use rpm to know this:

rpm -qi apache

Also, if you look into /var/log/httpd/error_log, when you start apache it tells the version of the httpd daemon, along with third-party modules that are configured on your installation.

The "apache standalone version" is the version that both appears when you query the rpm database and the Apache error log.

Paulo Fessel
L'employé propose, le boss dispose.
Sergejs Svitnevs
Honored Contributor

Re: apache

httpd -v
Print the version of httpd.

It's possible to run the httpd daemon in either stand-alone mode or via the Internet Server daemon (inetd). Running the daemon in stand-alone mode makes easier to start and stop individual processes without modifying the /etc/inetd.conf file constantly

Stuart Browne
Honored Contributor

Re: apache

Running it in stand-alone (as a daemon) is usually more efficient as well as easier to manage.

The wasy to tell if it is running in Standalone or launched fromthe super-daemon (inetd/xinetd) is to see which process are running, who their parents are, and who owns the port.

For example, stand-alone:

# ps -ef | grep http
root 795 1 0 Apr10 ? 00:00:13 /usr/sbin/httpd

The Parent PID (3rd field) is 1, meaning it's parent is 'init'. This is what happens to daemons which launch off into the background. As the process which launched it is no longer necessary, it removes any reliance on it.

For example, launched from inetd/xinetd:

# ps -ef | grep http
root 795 763 0 10:08 ? 00:00:00 /usr/sbin/httpd

The 3rd field is greater than 1, meaning that it was launched by something else. Further research shows:

# ps -fp 763
root 763 1 0 Apr10 ? 00:00:00 xinetd -stayalive -reuse

This is the super-daemon on this box.

Otherwise you could use a command similar to:

# netstat -ntlp | grep :80

(stand alone)
tcp 0 0* LISTEN 795/httpd

(launced from inetd)
tcp 0 0* LISTEN 763/xinetd

Just some little tid-bits.. mostly aimless rambling :)
One long-haired git at your service...