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

后端 未结 3 2070
抹茶落季
抹茶落季 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:49

    I had a problem where in the routes file (web.php) I had two routes (the same link) but different controller action. The second action was empty that's why it was blank.

    For example:

    Route::get('/route', 'Controller@firstAction');
    Route::get('/route', 'Controller@secondAction');
    
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-12-13 19:54

    I had the same problem, for some reason restarting Apache with Sudo made a difference. Are mods rewrite and mcrypt healthy?

    0 讨论(0)
提交回复
热议问题