I have been trying to open "/server-status" in Apache2 on my site that's facilitated by a WordPress installation and it is serving a "403 Forbidden" error response when I attempt to go to "mysite.com/server-status." After doing a LAMP install with WordPress on my server, I enabled "mod_status" in Apache2. I made sure that the server-status config file at "/etc/apache2/mods-enabled/status.conf" was correct. When I went to check "mysite.com/server-status" from both the localhost via lynx and my home computer, whose IP was allowed to access the Location "/server-status," it came back with a "403 Forbidden" response. I read this article Forbidden (403), when accessing server-status on apache 2.2.22, however, it is almost a decade old and Apache2 has changed some since the article was written, with there now being "Require" directives instead of the "Order-Deny-Allow" directive. Here are snippets from the status.conf file, apache2.conf file, virtual host file, and .htaccess file:
/etc/apache2/mods-enabled/status.conf:
<Location /server-status>
SetHandler server-status
<RequireAll>
Require host mysite.com
Require ip xx.xx.xx.xx
</RequireAll>
</Location>
/etc/apache2/apache2.conf:
<Location /server-status>
SetHandler server-status
<RequireAll>
Require host mysite.com
Require ip xx.xx.xx.xx
</RequireAll>
</Location>
/etc/apache2/sites-enabled/virtual-host.conf:
<Location /server-status>
SetHandler server-status
<RequireAll>
Require host mysite.com
Require ip xx.xx.xx.xx
</RequireAll>
</Location>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^(server-status|server-info) - [L]
#RewriteCond %{REQUEST_URI} /server-status - [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
As you can see I was playing around with the .htaccess file and have two methods of serving the "/server-status" page with one commented out.
Can anyone please provide me a solution so I can finally access the Apache2 server status?