Sol*_*orp 5 php nginx laravel-4
我的 nginx 服务器出现了一个奇怪的错误,因为我在这个项目上工作了好几个月,一切都工作正常,除了我添加的一个视图/页面,因为它向我显示 502 Bad Gateway,但我不知道为什么。
我已经尝试了很多方法,但问题仍然存在,并且在我的服务器块的日志中仅显示以下内容:
Nginx 服务器阻塞错误日志
2015/08/05 08:25:42 [error] 2423#0: *885 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 187.189.190.62, server: stage.mywebsite.com, request: "GET /business/user/site.com/edit HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "stage.mywebsite.com", referrer: "http://stage.mywebsite.com/business"
Run Code Online (Sandbox Code Playgroud)
php-fpm 错误日志
[05-Aug-2015 08:25:42] WARNING: [pool www] child 6825 exited on signal 11 (SIGSEGV) after 28731.872473 seconds from start
Run Code Online (Sandbox Code Playgroud)
[05-Aug-2015 08:25:42] 通知:[pool www] child 12469 启动
就这样
现在我将向您展示该块和 nginx.conf 的 nginx 配置
Nginx.conf
user nginx;
worker_processes 1;
worker_rlimit_nofile 1024;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
server_tokens on;
types_hash_max_size 1024;
types_hash_bucket_size 512;
server_names_hash_bucket_size 64;
server_names_hash_max_size 512;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Run Code Online (Sandbox Code Playgroud)
Nginx 服务器块
server {
listen *:80;
server_name stage.mywebsite.com;
root /var/www/website_stage/current/src/public/;
set $maintenance "off";
if ($maintenance = "on") {
return 503;
}
index index.php;
access_log /var/log/nginx/stage.mywebsite.com.access.log combined;
error_log /var/log/nginx/stage.mywebsite.com.error.log;
location ~ \.php$ {
root /var/www/website_stage/current/src/public/;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
}
location / {
root /var/www/website_stage/current/src/public/;
rewrite ^/(.+)/$ /$1 permanent;
try_files $uri $uri/ /index.php?query_string;
}
}
Run Code Online (Sandbox Code Playgroud)
我在 CentOS 7 上使用 Nginx 1.8。
我希望你可以帮助我。