2017-09-09 59 views
2

我創建了一個除default以外的文件來配置我的laravel APP。文件名是「laravel」。Laravel 5.5和nGinx:404除家庭以外的所有路由都未找到

的laravel文件:

server { 
    listen 80; 
    listen [::]:80; 

    root /home/user/var/www/laravel-blog/public; 

    index index.php index.html index.htm; 

    location/{ 
    try_files $uri $uri/ /index.php?query_string; 
    } 

    location ~ \.php$ { 
    include snippets/fastcgi-php.conf; 
    fastcgi_pass unix:/run/php/php7.0-fpm.sock; 
    # fastcgi_pass 127.0.0.1:9000; 
    } 

    location ~ /\.ht { 
    deny all; 
    } 
} 

有誰知道如何解決呢?謝謝!

回答

0

你檢查過php7.0-fpm日誌嗎?

我發現同樣的問題,使用全新安裝Laravel 5.5的時候,發現這對日誌:

WARNING: [pool www] child 5319 exited on signal 11 (SIGSEGV - core dumped) after 312.990977 seconds from start 

有可能是與你的PHP擴展的一個問題,禁用工作NewRelic的我。您可以嘗試在public/index.php上添加以禁用單個交易的新交易:

if (function_exists('newrelic_ignore_transaction')) { 
    newrelic_ignore_transaction(); 
}