How to activate Apache mod_status and avoid error 403 (no permission) and/or error 404 (not found)

The method we used below was tested on Apache 2.4.25 (Linux)

  1. Activate Apache mod_status:
    Before proceeding, we assume that you have successfully installed Apache server and it is running. In terminal, use command “sudo a2enmod status” without quotes.
  2. Configure and access status page from the internet:
    In terminal, use command “sudo nano /etc/apache2/mods-enabled/status.conf” without quotes.  Remove or put # sign before “Require local and Require ip…” if present, and add “Allow from all” under “SetHandler server-status”.
    Save, exit and in terminal restart by using command “sudo service apache2 restart” without quotes.
  3. Configure .htaccess file if using with WordPress ReWrite rule:
    Just put “RewriteCond %{REQUEST_URI} !=/server-status” before “RewriteRule . /index.php [L]” line. Save and exit, all without quotes.

You should now be able to access yourwebsite.com/server-status without 403 or 404 error.

Cheers!
Comments are welcomed.

Leave a Reply