[英]Laravel 4.2 + nginx 404 File not found
為何顯示錯誤?
我用laravel 5.2運行其他laravel項目很好,但我有laravel 4.2的舊項目,我收到此錯誤:
404 File Not Found
你可以在這里查看錯誤
在我的本地電腦上用php7 fpm使用Laravel Valet正常工作。
這是我的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>
我看到你正在使用hhvm而是添加。
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;
}
采用
include hhvm.conf
願這有用,因為它是hhvm的默認配置,所以沒有錯。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.