2

I have upgraded from an earlier Apache2 to the latest Apache 2.4. My previous setup had the following alias in default.conf file in the sites-available directory:

Alias /weewx /home/weewx/public_html
<Directory "/home/weewx/public_html">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

In the new Apache 2.4 setup I have added the following to 000-default.conf in sites-available:

Alias /weewx /home/weewx/public_html

<Directory /home/weewx/public_html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
</Directory>

But now I get a 403 error - "you don't have permission to access /weewx on this server". I have tried moving my new Alias and Directory entry into the alias.conf file in the mods-available directory, but that still give the 404 error.

Is there something wrong with my Directory entry, or are the Alias and Directory in the wrong place?

5

You need to add

Require all granted

to your new Directory container to grant access to this directory. That replaces the old

Order allow,deny
Allow from all

See the Apache documentation for more about this.

1

All alias's in apache 2.4 have to be configured in the /etc/apache2/mods-enabled/alias.conf file they are ignored in the virtual host files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.