Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable mod_info in Apache?

I've gone through the Apache guide to enable to mod_info.

As per doc:

  • To configure mod_info, add the following to your httpd.conf file.

    <Location /server-info>
        SetHandler server-info
    </Location>
    
  • You may wish to use mod_access inside the <Location> directive to limit access to your server configuration information:

    <Location /server-info>
        SetHandler server-info
        Order deny,allow
        Deny from all
        Allow from yourcompany.com
    </Location>
    
  • Once configured, the server information is obtained by accessing

    http://your.host.dom/server-info
    

In my case this link is not giving any info. Is there anything I need to install as mod_info.c or something? Is there anything I need to put as AddModule or something?

like image 329
Amit Nagar Avatar asked Dec 11 '12 08:12

Amit Nagar


People also ask

What is Mod_info?

mod_info. This allows the content of string to be shown as HTML interpreted, Additional Information for the module module-name . Example: AddModuleInfo mod_deflate. c 'See <a \ href="http://httpd.apache.org/docs/2.4/mod/mod_deflate.html">\ http://httpd. apache.

What is Apache module?

Modules are service programs that can be dynamically linked and loaded to extend the nature of the HTTP Server. In this way, the Apache modules provide a way to extend the function of a Web server. Functions commonly added by optional modules include: Authentication.


2 Answers

There should be a mod_info.so that must be on a path Apache 2 can find. For example, I have:

kdp@darwin ccl $ locate mod_info.so
/usr/lib64/apache2/modules/mod_info.so

Then, I have these in my httpd.conf:

ServerRoot "/usr/lib64/apache2"
LoadModule info_module modules/mod_info.so

This is made available by a snippet in /etc/apache2/modules.d/00_mod_info.conf:

<IfDefine INFO>
# Allow remote server configuration reports, with the URL of
# http://servername/server-info
<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
</Location>
</IfDefine>

(The IfDefine is only needed because of the way stuff is set up on Gentoo.)

like image 109
djc Avatar answered Sep 28 '22 08:09

djc


Check if info_module is loaded.

% /usr/local/sbin/httpd -t -D DUMP_MODULES | grep info_module

If it is not loaded, add following line to httpd.conf. Note that path/to must be replaced with appropriate path.

LoadModule info_module path/to/mod_info.so
like image 27
yasu Avatar answered Sep 28 '22 06:09

yasu