403 error on Apache for a laravel project, after upgrade to Ubuntu 13.10

后端 未结 3 2073
抹茶落季
抹茶落季 2020-12-13 19:03

I upgraded to Ubuntu 13.10. At first when running apache after the update, there were missing/broken files, so I simply re-installed apache. I backed up the vhost file. <

3条回答
  •  一向
    一向 (楼主)
    2020-12-13 19:52

    Apache2 may have also been upgraded to version 2.4, and there are a few things to note.

    First, do you have Apache 2.4.x+ now? Check by running:

    $ apache2 -v
    

    If so, your vhost needs some adjustment:

    First: +/- on Options:

    Some Options parameters needs the +/- syntax. Read more here. This might be especially important when mixing +/- on some directives (read the previous link to see more).

    Change:

    Options Indexes FollowSymLinks MultiViews
    

    to:

    Options +Indexes +FollowSymLinks +MultiViews
    

    Second: Allow/Deny

    Apache now does access control via mod_authz_host

    Change:

    Order allow,deny
    Allow from all
    

    to:

    Require all granted
    

    Some more info here on upgrading from Apache 2.2 to 2.4.

提交回复
热议问题