Nginx 502gateway错误故障解决

默认WDCP是以端口号作为转发的

修改成socket方式比较好。

server {
        listen       80;
        server_name admin.yeshuai.com;
        root /www/web/admin_yeshuai_com/public_html;
        index  index.html index.php index.htm;
        error_page  400 /errpage/400.html;
        error_page  403 /errpage/403.html;
        error_page  404 /errpage/404.html;
        error_page  405 /errpage/405.html;
        location ~ \.php$ {
#                fastcgi_pass   127.0.0.1:9000;
		fastcgi_pass   unix:/dev/shm/php-fpm.sock;
                fastcgi_index  index.php;
                include fcgi.conf;
        }
        error_log  /www/web_logs/admin.yeshuai.com_error.log;
}


注释掉上面的127.0.0.1:9000,启用下面的php-fpm.sock一行


记得重启nginx

service nginx reload

你可能感兴趣的:(server,listen)