Andrei Andrei - 1 year ago 134
Apache Configuration Question

server-status in wordpress htaccess

I want to enable server-status from mod_status

I have this on .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !=/server-status
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

httpd.conf is

<Location /server-status>
SetHandler server-status
Order Allow,Deny
Deny from all
Allow from

I'm using my external IP. I'm using this website to know my IP address.

But when I access it's a 403 forbidden but then when I change the http conf to all from all it can be accessible but I want it to only be accessible to my computer

Answer Source

Directive Order can be tricky, maybe that's the reason why it is deprecated.

Nevertheless, when you want to use it, just go by the examples in the documentation

In the following example, all hosts in the domain are allowed access; all other hosts are denied access.

 Order Deny,Allow  
 Deny from all  
 Allow from  

Do you see the different order of Deny,Allow?

To use the current Require directive, this should work

Require ip
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download