我在Laravel中使用Nginx并且我一直收到NotFoundHttpException
错误。
Nginx不会记录任何内容。我还尝试在die('Test');
文件中添加public/index.php
,但也不会将其转储。
我的Nginx server
块看起来像这样:
server {
listen 0.0.0.0:80;
server_name test.docker.dev;
root /usr/share/nginx/html/docs/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
# pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
access_log /var/log/nginx/default_access.log;
error_log /var/log/nginx/default_error.log;
}