1and1 Help Centre Categories

print article

Check Apache Settings and Modules

For Linux servers with root user access

Learn how to view information on the Apache Server, including Apache module list and settings.

Step 2
Run the vi /etc/httpd/conf/httpd.conf command to open the Apache configuration file in the vi text editor.
[root@u12345678 ~]# vi /etc/httpd/conf/httpd.conf

If you have made an error, press Esc and type :q!. Then press ENTER to quit without saving.

Step 3
When the file loads, type /server-info and press ENTER.
# /server-info
Step 4
A section regarding the server configuration reports which will be displayed.
#
# Allow remote server configuration reports, with the URL of
# http://servername/server-info (requires that mod_info.c be loaded).
# Change the ".example.co.uk" to match your domain to enable.
#
#<Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.co.uk
#</Location>
#

Before editing the file, find your IP address. Open your browser and go to whatismyip.com. The IP address of your computer will be listed.
Step 5
In the vi text editor, press i. Move the cursor and delete the pound signs (#) from the line beginning with <Location /server-info> up to the line starting with </Location>.
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from .example.co.uk
</Location>
Step 6
Change the line starting with Allow from by replacing the domain with the IP address of your computer (e.g. replace ".example.co.uk" with "74.208.111.111"). The goal is to deny access to all connections except for the connection from your IP address.
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 74.208.111.111
</Location>
Step 7
Press Esc and type :x to exit and save the changes.
# :x
Step 8
Type /etc/init.d/httpd restart to restart Apache so that it can load the changes.
[root@u12345678 ~]# /etc/init.d/httpd restart
Stopping httpd:                                         [   OK   ]
Starting httpd:                                         [   OK   ]
[root@u12345678 ~]#
Step 9
In your browser, enter your domain as the URL followed by /server-info (e.g. www.1and1help.co.uk/server-info). You will see a page containing information about the Apache Settings and the Loaded Modules. Apache Server Information
Apache Server Information

For additional information, you may want to reference: