Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

madmaxax's avatar

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?

  1. 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.

  2. 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.

  3. 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.

0 likes
7 replies
jsonkenyon's avatar

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?

madmaxax's avatar

It is just a webspace managed by 1und1, I don't have any admin rights to the server and to its logs. So, unfortunately I can't say much about it.

jsonkenyon's avatar

Hmmm, shared hosting then. Chances are they are running SuPHP, all your files should be 644 in permissions and all folders should be 755. See if you change the storage and the subfolders to 755 if that doesn't fix it. SuPHP will have a fit with 757 permissions, as it is to open.

madmaxax's avatar

Thanks! I changed the permissions like you said. It didn't change anything. I had an idea yesterday. Could it be related to the fact that I set my Webspace-root to the public directory and I am requesting files that are in the resources directory?

martinbean's avatar

@madmaxax You should still have access to PHP error logs, even on a 1&1 shared hosting account.

jsonkenyon's avatar

The only other thing left to do in this case would be to check your php error logs. However, you are getting a 500 error on Chrome and Firefox, so i'm 99% sure you are getting some sort of Apache error, in which case you would have to reach out to 1and1 and ask them to see if they can check the error logs. I know cPanel you can access them in the metrics under error.

However, if I recall 1and1 run their own custom control panel and they aren't using cPanel. Try and contact them and see if they can give you whats showing in the Apache log, may give you more information as to what needs to happen.

madmaxax's avatar

Thanks a lot for all this! I will look into it

Please or to participate in this conversation.