php - 子域内部服务器错误上的 laravel 5.6 此外,遇到 500 内部服务器错误错误
问题描述
它不会向错误日志写入任何内容!
我有一个指向托管 laravel 应用程序的服务器 IP 的子域。
主页运行良好(subdomain.domain.com)并显示 laravel 徽标。
我添加到 URL 的任何其他内容都会显示此错误。
例如: subdomain.domain.com/test 显示此错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, cgiadmin@yourhostingaccount.com and inform them of the time the error occurred, and anything you might have done that may have caused the 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.
我正在使用 apache 虚拟主机来处理请求,它看起来像这样:
<VirtualHost *:80>
ServerName subdomain.domain.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/mysite/public/
<Directory /var/www/mysite/public/>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mysite-error.log
CustomLog ${APACHE_LOG_DIR}/mysite-access.log combined
</VirtualHost>
这是公用文件夹中的 .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteBase /
# Handle Authorization Header
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]
</IfModule>
默认的错误日志文件和我在虚拟主机中指定的都是空的。
当我直接使用IP时,它工作正常。所以http://123.123.123.123/test有效。
解决方案
推荐阅读
- google-cloud-platform - 如何在 C++ 谷歌云存储客户端库中创建没有 json 的 gcs::Client?
- java - Spring boot gradle + lombok - 在编译类路径上检测注释处理器已被弃用
- prestashop - 将新词添加到 prestashop 语言
- mysql - 使用 Workbench 在 Column (Average) 中添加一个函数
- javascript - 在angular6模板中使用getter方法或类变量?
- android - 从 Base64 编码的 ASN1 结构中解码 PKCS8 密钥是否容错?
- javascript - 如何将 Highchart 的折线图从简单的 html 转换为 Flask?
- c - 扩大“zoul”的堆大小
- javascript - 为什么我的 RegExp 替换为此输入进行无限循环?
- angular - 如何在 Angular 2 组件构造函数中模拟 jasmine 中的记录器服务