Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm configuring server-status and get 404 error. I need allow access to server-status only from site subdomain on same IP. I put server-status location to virtualhost config, but it's not working.

If I put location into httpd.conf, server-status works on all subdomains.

NameVirtualHost 127.0.0.1:8082
<VirtualHost 127.0.0.1:8082>
    ServerName tools.sitename.ru
    RPAFenable On
    RPAFsethostname Off
    RPAFproxy_ips 127.0.0.1
    #    RPAFheader X-Real-IP
#    AllowOverride All
    DocumentRoot /var/www/tools.sitename

    DirectoryIndex index.php index.html default.asp index.cgi
    ErrorLog /var/log/httpd/tools.sitename.error.log
    CustomLog /var/log/httpd/tools.sitename.access.log common

    <Location /server-info>
        SetHandler server-info
        Order deny,allow
        Deny from all
        Allow from all
    </Location>

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

    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>
</VirtualHost>
share|improve this question

migrated from webmasters.stackexchange.com Jan 11 at 11:52

This question came from our site for pro webmasters.

1 Answer 1

Ah yes - dont I remember my hair-pulling sessions when I encountered this a while back then. Use double quote when identifying <location />

For example - in my apache2 virtual hosting, similar setup as yours:

 <Location "/">
            Order Deny,Allow
            Deny from all
            Allow from all
    </Location>

I noticed that double quote marks is used for but not others as needed. But, that's how I beat Apache to get working. EDIT: After checking, it appears that I also used double quote marks for <directory "/var/www"> as well. Strangely enough, but, that's how I get Apache to work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.