主机移动后,Laravel 403 Forbidden错误

I have a Laravel 5.7 project working fine, but I changed the host and i got this error:

Laravel 403 Forbidden Error

I updated the .htaccess file with this code:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ public/ [L]
    RewriteRule (.*) public/$1 [L]
</IfModule>

but I still get the error.

Inside your .htaccess change to this:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^public
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule> 

You should try

chown -R www-data:www-data .

within your website folder