2

I turned off access_compat module and changed all Order directives to Require in order to comply Apache 2.4 requirements.

My public virtual hosts still working fine. But I get "Require all denied" not working when I test it. Everybody has access to site.

In apache2.config:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>

<Directory /var/www/>
        Options FollowSymLinks Includes
        AllowOverride None
        Require all granted
</Directory>

In virtual host file:

DocumentRoot /var/www/my.site
ServerName my.site

    <Directory />
        Require all denied

        AddType application/x-httpd-php .html .php

        DirectoryIndex index.html index.php
    </Directory>

I've read all Apache help on "Require" and tried everithing I could imagine. Please help.

Apache version: Apache/2.4.7 (Ubuntu)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.