2

I'm trying to add server-status location directive under one of my virtual host, however i'm getting a 403 Access Forbidden when browsing to www.mywebsite.com/server-status. Is it legal to put the Location Directive under a virtual host?

Edit #1: Full vhost config

<VirtualHost *:80>
  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin [email protected]
  ServerName  aumento.io
  ServerAlias  www.aumento.io


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/cairocubicles/web/aumento.io/public
    <Directory /home/cairocubicles/web/aumento.io/public>
        Order Allow,Deny
        Allow from all
        Options Indexes FollowSymLinks
        AllowOverride All
        AcceptPathInfo On
    </Directory>

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from aumento.io
</Location> 

  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/cairocubicles/web/aumento.io/log/error.log

</VirtualHost>
1
  • Where are you trying to access the status page? Or more specifically, are you trying to access the status page from the exact IP that aumento.io resolves to (Apache must see the connection as coming from this IP)? Nov 16, 2012 at 7:18

1 Answer 1

5

Yes, the documentation states that location can be used in server and vhost contexts.

Check the underlying file system to ensure that the webserver has suitable permissions to access the files and directories.


Your update shows that you are only allowing access from aumento.io. Ensure that the IP address for aumento.io resolves to the address of the machine you are connecting from. If it does and the webserver is on the same machine as aumento.io then you should check the logs to see what IP address apache thinks you're connecting from and add it to the list (you are most likely connecting via the loopback interface) e.g.

Allow From aumento.io 127.0.0.1
1
  • @lain but i keep getting a 403 Forbidden, the website works fine expect for aumento.io/server-status, i added the full vhost in the question above Nov 15, 2012 at 23:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .