I am running 10.7.4. I have Apache up and running. It serves html and php as expected. I was playing around with apachectl
and wanted to see what fullstatus
did. The complete command is:
$ apachectl fullstatus
The response on the command line is:
Go to http://localhost:80/server-status in the web browser of your choice.
Note that mod_status must be enabled for this to work.
A apachectl -t -D DUMP_MODULES | grep status
shows:
Syntax OK
status_module (shared)
Upon doing that I get a 403 saying I don't have access to server-status. In looking at the access log I see:
localhost - - [29/May/2012:17:36:53 +0800] "GET /server-status HTTP/1.1" 403 324
error log:
[Tue May 29 17:36:53 2012] [error] [client ::1] client denied by server configuration: /Library/WebServer/Documents/server-status
I pored over the /etc/apache/httpd.conf
but couldn't find anything.
How do I configure Apache so that I can view the server-status?
This is the solution if you are running Mac OS X 10.11 El Capitan. Note: You need administrator privileges. (sudo)
/etc/apache2/httpd.conf
uncomment these linesLoadModule status_module libexec/apache2/mod_status.so
Include /private/etc/apache2/extra/httpd-info.conf
/etc/apache2/extra/httpd-info.conf
and change lines 14-18 toNow you can open the URL
http://localhost/server-status
with your web browser and see the apache status.For a "fullstatus" place the text
ExtendedStatus On
within/etc/apache2/extra/httpd-info.conf
right before the<Location /server-status>
line.In order to handle requests to
/server-status
with mod_status, you will need the following lines somewhere in your configuration:Don't forget to restrict access to localhost or other trusted hosts using Allow/Deny or the newer Require directives.