首先需要设置日志记录,因此我在配置文件中注释了error_log:
error_log logs/nginx_error.log;
然后在日志中,我可以看到:
2017/05/27 22:37:29 [crit] 41617#0: *1 open() "/usr/local/var/run/nginx/proxy_temp/1/00/0000000001" failed (13: Permission denied) while reading upstream, client: 127.0.0.1, server: localhost, request: "GET /vendor.bundle.js HTTP/1.1", upstream: "http://127.0.0.1:4200/vendor.bundle.js", host: "localhost:8082", referrer: "http://localhost:8082/"
日志显示了以下权限问题:
/usr/local/var/run/nginx/proxy_temp/1/00/0000000001
修复此路径上的权限可以解决问题



