我在linux下安装了nginx在windows下装了apache现在打算用nginx的反向代理当用户请求的是php文件时nginx自动传递到windows下的apache 配置代码如下 :
location ~ \.php$ {
proxy_pass http://192.168.137.1:80;
}
注:nginx地址为192.168.137.20 apache下的为192.168.137.1
现在显示504
网关超时,可能是Nginx转发PHP请求的时候出了问题,建议查看nginx和php日志文件,可以排查出来
2017/09/13 22:54:43 [error] 1318#0: *1042 upstream timed out (110: Connection timed out) while connecting to upstream, client: 192.168.137.1, server: 192.168.137.20, request: "GET /te/te.php HTTP/1.1", upstream: "http://192.168.137.1:80/te/te.php", host: "192.168.137.20"
看下?