How to find running Apache version in Linux?

Linux OS Topics
Post Reply
User avatar
Saman
Lieutenant Colonel
Lieutenant Colonel
Posts: 828
Joined: Fri Jul 31, 2009 10:32 pm
Location: Mount Lavinia

How to find running Apache version in Linux?

Post by Saman » Thu May 20, 2010 3:19 am

httpd is the Apache HyperText Transfer Protocol (HTTP) server program. In order to find out apache version login to server using ssh. Once logged in type the following command to print the version of httpd, and then exit:

Code: Select all

# httpd -v
Sample output:

Code: Select all

Server version: Apache/2.2.3
Server built:   Oct 28 2008 07:22:45
Output a list of modules compiled into the server:

Code: Select all

# httpd -l
This will not list dynamically loaded modules included using the LoadModule directive. To dump a list of loaded Static and Shared Modules:

Code: Select all

# httpd -M
Print the version and build parameters of httpd, and then exit

Code: Select all

# httpd -V
To view other configuration settings open httpd.conf file (usually located in /etc/httpd directory). Red hat, CentOS and Fedora stores httpd at the following location:

Code: Select all

# vi /etc/httpd/conf/httpd.conf
Debian and Ubuntu stores httpd.conf in apache2.conf file at the following location:

Code: Select all

# vi /etc/apache2/apache2.conf
FreeBSD stores apache2.2 configuration at the following location:

Code: Select all

# vi /usr/local/etc/apache22/httpd.conf
If you made any changes to httpd.conf, check httpd syntax for error using the -t option:

Code: Select all

# httpd -t
Post Reply

Return to “Linux”