子域内部服务器错误上的laravel 5.6另外,遇到500内部服务器错误错误

时间:2018-06-23 14:30:19

标签: php laravel apache .htaccess subdomain

它没有向错误日志中写入任何内容!

我有一个子域,指向托管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有用。

0 个答案:

没有答案