Could be anything, check your logs. Do you have the required environment variables set; APP_KEY, DB credentials etc.?
500 Internal Server Error
Hi, I have been working with laravel 5.5 on my localhost, Everithing works great But when i tried uploading it to server i get the error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
My .htaccess file looks like Options -MultiViews -Indexes
RewriteEngine On
# Handle Authorization Header
RewriteBase /
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]
Anyone with an idea on how to fix this?
If you ls the project, who owns the files and directories (i.e. what are the user and group permissions)?
I don't know your exact production environment so giving a specific answer is difficult; but use the following as a guide:
On your server, set the ownership of the laravel project as you and group to the apache user:
sudo chown -R your-user:www-data /path/to/your/laravel/root/directory
Set the permissions for you and the web server:
sudo find /path/to/your/laravel/root/directory -type f -exec chmod 644 {} \;
sudo find /path/to/your/laravel/root/directory -type d -exec chmod 775 {} \;
Next, give the web server user read and write permissions to the storage, cache and any other directories it will need to write to:
sudo chgrp -R www-data storage
sudo chmod -R ug+rwx storage
Please or to participate in this conversation.