0

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?

1
  • Apache 2.2 end of life which makes the question off topic. Upgrade to a supported version imho Commented Apr 15, 2024 at 5:21

1 Answer 1

0

I am using Apache-2.4. I only referenced the article on Apache-2.2 because it was pertinent to my question. I am not using 2.2. It's not about my upgrading the software, but configuring my installation so that I can see "/server-status".

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.