I have installed the default WordPress application image from digital ocean. I tried to follow this tutorial but it doesn’t work for me:
If I visit http://<my IP>/server-status I get a 404 page the one and only website I have installed on this server. If I visit http://www.domain.com/service-status I get this:
403
Forbidden
You don't have permission to access /server-status on this server.
How can I get this working?
If I try to visit it from lynx from the local host in the terminal whether I use domain name, IP or 127.0.0.1 or localhost I get 404 not found (weird!).
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
What fixes this issue is a mix of settings. At least for myself, and my server.
First in your apache virtualhost configuration you need to change allow overides
<Directory Some/directory/here > # Options Indexes Options -FollowSymLinks Options -Multiviews Options -Indexes AllowOverride None </Directory>
Then before the closing virtualhosts command you place this
<Location /server-status> SetHandler server-status # Require local Require ip YOUR IP here/Server IP </Location> </VirtualHost>
Then IF you have the defualt apache2 config modified to your liking with other settings. Like a custom Wordpress installation. You should have this as well for .HTACCESS
The important line is this RewriteCond %{REQUEST_URI} !=/server-status
.HTACCESS file settings
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/server-status RewriteRule . /index.php [L] </IfModule> php_flag register_globals off
php_flag display_errors Off #Options FollowSymLinks Options -Indexes Options -ExecCGI Options -IncludesNOEXEC
Hope my post solves some other issues,
Thanks for the reply. Adding this rewrite rule only makes it so www.mydomain.com/server-status is a “Forbidden” error instead of a 404.
This is what my /etc/apache2/mods-available/status.conf file says (I had already edited it):
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1 ::1
Allow from <my public IP>
</Location>
I am trying to access it form the local host but I am still getting this forbidden error. Any other ideas?
Thanks.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.