The mod\_info module provides comprehensive information about the server configuration. It includes details such as installed modules and directives in the configuration files.
Here are the steps to use the mod\_info module in Apache:
Step 1: Ensure Mod\_Info Is Enabled
By default, most of the Apache installations have all modules enabled. However, you can confirm this by looking for the following line in your httpd.conf file.
LoadModule info_module modules/mod_info.so
If it’s commented out (prefixed with a ‘#’), remove the ‘#’ and save the file.
Step 2: Add Location Directive to Apache Configuration
The next step is to add this set of lines just before the closing section of the main part of httpd.conf:
This will create a new directory “server-info” that will display mod\_info data. The “Order” and “Allow” directives are added for security reasons.
Step 3: Restart Apache Server
Whenever you make changes to Apache’s configuration file, you must restart the server for the changes to take effect. Use:
systemctl restart httpd
For some systems, you may need to use:
service httpd restart
Step 4: Accessing Server Information
finally, to access the server information utilising the mod\_info module, type the following in your web browser:
http://localhost/server-info
Keep in mind that Apache’s mod\_info provides very detailed information about the server configuration, including sensitive information (like file paths), so be careful not to make this information publicly accessible.