php5 over nginx正在提供502坏网关,但在apache2.Am正常运行Apache默认端口和nginx端口81上工作正常。
错误日志消息:
2016/12/02 12:32:05 [alert] 10119#0: 768 worker_connections are not enough
2016/12/02 12:32:05 [error] 10119#0: *2295 recv() failed (104: Connection reset by peer) while
reading response header from upstream, client: 127.0.0.1, server: localhost, request:
"GET /index.php HTTP/1.0", upstream: "http://127.0.0.1:81/index.php", host: "127.0.0.1".
我的自定义服务器文件:
server {
listen 81;
root /var/www/html/laralvelproj/public/;
index index.html index.htm index.php;
server_name localhost;
error_log /var/www/html/yoyogrx.com-error.log error;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:81;
}
}
有人可以帮助我。