【发布时间】:2017-03-20 16:46:28
【问题描述】:
我在 laravel 框架中创建了一个网站,该网站在本地服务器上运行良好,所以我开始将它上传到服务器上。首先我制作了一个除公共文件之外的所有文件的 zip 文件,并将其上传到名为“laravel”的文件夹中我在我的 cpanel 的主目录中制作并提取了内容。之后我制作了一个公共 zip 并将 zip 上传到 public_html 文件夹中并解压缩它。然后我将 index.php 编辑到 /../bootstrap/ 到 / ../laravel/bootstrap 在这两个地方并保存了它..之后我转储了数据库并成功地在.env文件中进行了更改。问题是现在有500个内部服务器错误
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@tncpscouriers.com 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.
最初有一个单页静态网站,所以我想更改 te index .php 以使其重新恢复,但它仍然无法正常工作。我现在一无所知,请帮助今天是我将项目移交给客户的截止日期 我的 .htaccess 文件是
<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 ^(.*)/$ /$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}]
【问题讨论】:
-
检查服务器错误日志和
/storage/logs中的任何日志,它会告诉你为什么会收到 500 错误。 500 错误本身的范围太广,无法进行故障排除。 -
在我的 cpanel 中,我发现了矩阵标题中的错误。列出了错误
5:08.076146 2017] [:error] [pid 12349] [client 49.202.144.203:46977] SoftException in Application.cpp:651: Directory "/home/tncpscouriers/public_html" is writeable by group -
chmod
public_html和子文件夹到755:chmod -R 755 public_html。另外,查找.htaccess的问题 -
我会更多地寻找致命错误而不是 SoftExceptions