3

I 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 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 the this link is not giving any info. Http 404 NOT FOUND error

  • Is there anything I need to install as mod_info.c or something ? Is there anything i need to put as AddModule or something ?

  • Without virtual host I got below error : File does not exist: /usr/local/apache2/htdocs/server-info [Tue Dec 11 03:39:53 2012] [error] [client 10.177.246.184] File does not exist: /usr/local/apache2/htdocs/favicon.ico

  • In Error log : File does not exist: /usr/local/apache2/htdocs/example1/server-info I have 3 virtual host. One of this as default which use example1 as Docroot dir. I am not sure where this page (server-info) should be ? in case of server-status, it's working fine

Amit Nagar
  • 31
  • 1
  • 4
  • What do you mean by does not give any info? What do you get, is there an error message, is there any relevant information in our apache logs ? – user9517 Dec 11 '12 at 09:04
  • 404 Error Code.Not Found The requested URL /server-info was not found on this server. – Amit Nagar Dec 11 '12 at 09:13
  • Did you restart apache after changing the configuration ? – user9517 Dec 11 '12 at 09:17
  • Yes I restart the server multiple times. Is there anything I need to install as "mod_info" or include "AddModule mod_info path for mod_info.c" ? or it's default enable in Apache 2.X ? – Amit Nagar Dec 11 '12 at 09:26
  • 1
    Is there anything in your error log? That's usually a good place to start looking. – Oldskool Dec 11 '12 at 09:46
  • In Error log : File does not exist: /usr/local/apache2/htdocs/example1/server-info I have 3 virtual host. One of this as default which use example1 as Docroot dir. I am not sure where this page (server-info) should be ? in case of server-status, it's working fine. – Amit Nagar Dec 11 '12 at 10:25
  • You're not hitting the vhost you have this configured in. Include the output of `httpd -S` with your question. – adaptr Dec 11 '12 at 11:02
  • I set SetHandler and access the http://localhost/server-info same as server-status. Is there any problem ? I think that In Apache, first Virtual Host taken as default host. So if request comes from localhost it's use first V.host. – Amit Nagar Dec 11 '12 at 11:06
  • Without virtual host I got below error : File does not exist: /usr/local/apache2/htdocs/server-info [Tue Dec 11 03:39:53 2012] [error] [client 10.177.246.184] File does not exist: /usr/local/apache2/htdocs/favicon.ico – Amit Nagar Dec 11 '12 at 11:41

2 Answers2

4

I guess simply using a2enmod info will work in your case.

NOTE: a2enmod is only available on Debian variants (i.e. Ubuntu, etc.). You can read more about a2enmod here.

a2enmod and it's sister command a2dismod can be used to enable or disable apache2 modules.

examples

% a2enmod imagemap
% a2dismod mime_magic
slm
  • 7,615
  • 16
  • 56
  • 76
XuZhangning
  • 141
  • 4
1

Yes, you will need to make sure you have a LoadModule info_module statement in your httpd.conf for mod_info and you should also check that your settings are not conflicting with other mod_info-related directives below yours, in .htaccess files, or in other configuration files loaded as part of an Include directive. Finally, check that mod_info is actually installed. I wouldn't be surprised if it wasn't installed because the data mod_info provides is viewed as an information disclosure vulnerability by some security folks.

mahnsc
  • 1,796
  • 13
  • 11