[英]Strange issue when uploading a Laravel project to shared hosting
I have created a Laravel 2 project and uploaded it to a web host, but the website gives a 500 error. 我创建了一个Laravel 2项目,并将其上传到网络主机,但该网站显示500错误。 I have given 777 permmisions to storge and subfolders.
我为存储和子文件夹提供了777个permmision。 I cleared the views cache but that didn't solve the problem.
我清除了视图缓存,但没有解决问题。
I want to know, why is this problem occurring? 我想知道为什么会出现这个问题? the error
错误
the public/.htacess file Options -MultiViews public / .htacess文件选项-MultiViews
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [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}]
Could be a number of issues. 可能有许多问题。 Check the following:
检查以下内容:
composer install
to install the vendor files required for Laravel to run? composer install
来安装Laravel运行所需的供应商文件? chmod -R 777 storage
(as you have already tried) chmod -R 777 storage
(已尝试) chmod -R 777 bootstrap/cache
chmod -R 777 bootstrap/cache
Hopefully these steps will help you resolve the issue. 希望这些步骤可以帮助您解决问题。 If you still have issues, see if you can locate the
error_log
file on your server and see if it points to the issue. 如果仍然有问题,请查看是否可以在服务器上找到
error_log
文件,并查看它是否指向问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.