Laravel - Forbidden You don't have permission to access / on this server

前端 未结 24 1847
灰色年华
灰色年华 2020-11-30 02:02

My laravel installation was working fine yesterday but today I get the following error:

Forbidden

You don\'t have permission to access / on this server.

Ad         


        
24条回答
  •  迷失自我
    2020-11-30 02:33

    First, update your Virtual Host configuration;

    
        ServerName example.com
        DocumentRoot /var/www/html/example-project/public
        
            AllowOverride All
            Require all granted
        
    
    

    Then, change both permission and ownership of the asset as illustrated below.

    $ sudo chgrp -R www-data /var/www/html/example-project
    $ sudo chmod -R 775 /var/www/html/example-project
    

提交回复
热议问题