【发布时间】:2016-10-25 09:49:39
【问题描述】:
为什么显示错误?
我在 laravel 5.2 上运行其他 laravel 项目很好,但我有 laravel 4.2 的旧项目,但出现此错误:
404 File Not Found
您可以检查错误here
在我的本地电脑上,使用 Laravel Valet 运行良好的 php7 fpm。
这是我的 nginx 配置文件:
server {
listen 80;
server_name blog.yourserviceconnection.com;
root var/www/html/blog/public/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.(hh|php)$ {
fastcgi_keep_conn on;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
在我看来一切都很好,这是 .htaccess 文件:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
【问题讨论】:
标签: php laravel nginx laravel-4