Laravel项目没有显示任何页面

时间:2018-04-04 09:52:00

标签: php windows laravel hosting

我在本地计算机上准备了一个Laravel 5.6网站(简单的网站,没有数据库),它运行得很好。现在我想在生产中部署它,我有一个问题,我无法解决....

我遵循了部署路径(从服务器上的本地公共文件夹复制到公共文件夹,将其他文件复制到公共文件夹旁边的单独文件夹。所有访问权限都根据Laravel指令设置,也调整了索引.PHP。

但是,尽管所有活动都找出原因,但起始页面从未出现过。我在index.php中添加了一些额外的调试语句,这表明此语句没有响应:

$response = $kernel->handle(
$request = Illuminate\Http\Request::capture());

我担心环境有问题,因此我添加了htaccess:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
</IfModule>

RewriteEngine On

# 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>

# SetEnv mod_developer secure-key-xxxxxxxxxxx

还是web.config的相关部分:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <directoryBrowse enabled="false" />
    <handlers>
        <clear />
        <add name="ASPClassic (*.htr)" path="*.htr" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="C:\Windows\system32\inetsrv\asp.dll" resourceType="File" requireAccess="Script" preCondition="" />
        <add name="ASPClassic (*.cdx)" path="*.cdx" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="C:\Windows\system32\inetsrv\asp.dll" resourceType="File" requireAccess="Script" preCondition="" />
        <add name="ASPClassic (*.asa)" path="*.asa" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="C:\Windows\system32\inetsrv\asp.dll" resourceType="File" requireAccess="Script" preCondition="" />
        <add name="php-7.2.3" path="*.php" verb="GET,HEAD,POST" type="" modules="FastCgiModule" scriptProcessor="C:\Program Files\PHP\v7.2\php-cgi.exe" resourceType="Either" requireAccess="Script" preCondition="" />
        <add name="PHP_via_FastCGI2" path="*.php" verb="GET,HEAD,POST" type="" modules="FastCgiModule" scriptProcessor="C:\Program Files\PHP\v7.1\php-cgi.exe" resourceType="Either" requireAccess="Script" preCondition="" />
        <add name="PHP_via_FastCGI" path="*.php" verb="GET,HEAD,POST" type="" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.6\php-cgi.exe" resourceType="Either" requireAccess="Script" preCondition="" />
        <add name="PHP_via_FastCGI1" path="*.php" verb="GET,HEAD,POST" type="" modules="FastCgiModule" scriptProcessor="C:\Program Files\PHP\v7.0\php-cgi.exe" resourceType="Either" requireAccess="Script" preCondition="" />
       <add name="StaticFile" path="*" verb="*" type="" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" scriptProcessor="" resourceType="Either" requireAccess="Read" preCondition="" />
    </handlers>
    <defaultDocument>
        <files>
            <clear />
            <add value="Default.html" />
            <add value="Default.htm" />
            <add value="Default.asp" />
            <add value="index.htm" />
            <add value="Default.aspx" />
            <add value="index.html" />
            <add value="index.php" />
            <add value="index.asp" />
        </files>
    </defaultDocument>
    <httpErrors errorMode="DetailedLocalOnly" existingResponse="Auto" />
</system.webServer>
</configuration>

在网络服务器日志中,我看到以下结果:

#Software: Microsoft Internet Information Services 8.0
#Version: 1.0
#Date: 2018-04-04 08:48:30
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2018-04-04 08:48:30 W3SVC168 192.168.0.97 GET / - 443 - 94.208.181.162 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:59.0)+Gecko/20100101+Firefox/59.0 - 200 0 0 31898 428 4715
2018-04-04 08:50:56 W3SVC168 192.168.0.97 GET / - 443 - 94.208.181.162 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:59.0)+Gecko/20100101+Firefox/59.0 - 200 0 0 31914 454 702
2018-04-04 08:51:03 W3SVC168 192.168.0.97 GET / - 443 - 94.208.181.162 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:59.0)+Gecko/20100101+Firefox/59.0 - 200 0 0 31914 454 561
2018-04-04 08:52:53 W3SVC168 192.168.0.97 GET / - 443 - 94.208.181.162 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64;+rv:59.0)+Gecko/20100101+Firefox/59.0 - 500 0 0 373 454 405

在这个日志中我看到一个http-error 500,但是导致这个错误的原因是什么。 ?我认为这是我的页面没有出现的主要原因。 所以我希望有人可以帮助我...

如果你想看到现实世界:staging.rt-eureka.nl

0 个答案:

没有答案