samedi 5 octobre 2019

why I get 403 error after moving my laravel 5 app to new shared hosting?

I moved my laravel 5 app from VPS to shared hosting and when trying to navigate to the site url "http://website.com/app/public" I get the following error: enter image description here

and in the errors section in cpanel I see this:

[Sat Oct 05 06:19:49.290682 2019] [core:crit] [pid 2811723:tid 47589351302912] (13)Permission denied: [client 198.xx.xx.xxx:41498] AH00529: /home/xxxx/public_html/app/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/xxxx/public_html/app/' is executable

update: "/home/xxx/public_html/app/.htaccess" contents:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews -Indexes
</IfModule>

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire