Error 404 when running apachectl status
If you see Error 404 or "Object not found" when you run
$ /usr/sbin/apachectl status
in your terminal, it probably happens either because you do not have the module "mod_status" compiled with HTTP server or because the module simply is not loaded. First, you check the compiled modules by typing
$ /usr/sbin/apachectl -l | grep status
If you see mod_status.c, the module is compiled correctly. Then you check the configuration file to see if it is loaded. In "httpd.conf" file, I found that the following line is commented out and I changed it to be included.
# Real-time info on requests and configuration Include conf/extra/httpd-info.conf
I also modified the Allow directive in the file "httpd-info.conf", to allow only local access such as
Allow from 127.0.0.1
At last, the command apachectl status can give the following info
Apache Server Status for localhost Server Version: Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8b DAV/2 PHP/5.2.4 SVN/1.4.5 Server Built: Oct 9 2007 10:27:16 -------------------------------------------------------------------------- Current Time: Tuesday, 15-Jan-2008 16:25:12 PST Restart Time: Tuesday, 15-Jan-2008 16:23:39 PST Parent Server Generation: 0 Server uptime: 1 minute 33 seconds