Location Directive in a VirtualHost

Posted by Yehia A.Salam on Server Fault See other posts from Server Fault or by Yehia A.Salam
Published on 2012-11-15T22:29:28Z Indexed on 2012/11/15 23:04 UTC
Read the original article Hit count: 184

Filed under:

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>

© Server Fault or respective owner

Related posts about apache2