The best thing in this case is to start checking the Apache/NGINX logs, this will tell you more information about the error that you have. If it is indeed a permissions error it will let you know. Do you happen to know the PHP handler that you are using? suPHP, DSO, etc?
500 Internal Server Error when deploying project
I have been working on this project for a year now and it works 100% locally on vagrant. But when I deploy it to the webspace only the file index.php can be accessed. Trying to access any other routes than the /-route I get the 500 Internal Server Error.
I believe the reason why access the other routes cannot be accessed, is the way my project is structured and the permissions it has. It seems to me, that the blade.php-files cannot be accessed due to some misconfiguration. I tried I a lot of things like the following to solve this, but didn't get any further. Have you had a similar issue and can tell me what I am missing?
-
The url of my project https://www.muza-store.de is connected to the project-root which is /muza-store/public/. And the structure of my project is like all new Laravel projects. I tried changing it so that the contents of the public folder are in its own directory. But it didn't make a change. So, I went back to the original structure.
-
I set the permissions of the project to 644 for all files and 755 for all folders except for the storage folder. The permissions for the storage folder and its subfolders are 757.
-
The .htaccess-file is attached below. I tried playing around with it but that didn't work either.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ / [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/ [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#Disable index view
options -Indexes
#hide a Specific File
<Files .env>
order allow,deny
Deny from all
</Files>
</IfModule>
Do you have any ideas and tipps on what might be the problem? Thank you so much for your help!! I really appreciate it.
Please or to participate in this conversation.