環境:EC2上跑docker nginx
現象:502 bad gateway
解決方法:查看 /var/log/nginx/error.log
2020/01/07 14:43:30 [crit] 17362#17362: *4 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory)
環境:Mac上跑MAMP nginx
現象:502 bad gateway
解決方法:瀏覽器地址欄中把localhost換成127.0.0.1
現象:404 Not Found
解決方法:查看 /var/log/nginx/error.log
2020/01/08 22:32:21 [error] 11216#0: *17 open() "/Users/incpad/src/pinpoint/index.php/sign/login" failed (20: Not a directory), client: 127.0.0.1, server: , request: "POST /index.php/sign/login HTTP/1.1", host: "127.0.0.1:7888", referrer: "http://127.0.0.1:7888/index.php?desktop=1"