Error 403 when accessing virtualhost apache

0

This is my virtualhost configuration:

<Macro VHost $PORT $SERVERADMIN $SERVERNAME $SERVERALIAS $DOCUMENTROOT $PASS $LOG_DIR>
    <VirtualHost *:$PORT>
        ServerAdmin $SERVERADMIN

            ServerName $SERVERNAME
            ServerAlias $SERVERALIAS

            DocumentRoot $DOCUMENTROOT
            <Directory $DOCUMENTROOT>
                Options Indexes FollowSymLinks
                AllowOverride All
                Order deny,allow
                Allow from all
            </Directory>

            ErrorLog "$LOG_DIR/error.log"

            LogLevel warn

            CustomLog "$LOG_DIR/access.log" common
        </VirtualHost>
</Macro>
    
asked by Roman González 23.02.2018 в 21:19
source

1 answer

1

The solution was quite simple, I needed to add this directive:

Require all granted

<Directory $DOCUMENTROOT>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order deny,allow
    Allow from all
    Require all granted
</Directory>
    
answered by 23.02.2018 в 21:36