【发布时间】:2018-06-29 15:55:19
【问题描述】:
/etc/nginx/nginx.conf 文件 在 http 部分,给出以下信息。
包括/etc/nginx/conf.d/*.conf;
/etc/nginx/conf.d/myapp.conf文件内容
server {
listen 80;
listen [::]:80;
server_name _;
index index.html index.htm;
location / {
proxy_pass 'http://XXXXX:3005/';
}
location /admin/ {
proxy_pass 'http://XXXX:3000/';
}
}
http://XXXX 正在重定向到主页。 http://xxxxx/admin/ 没有重定向。相反,它在 chrome 控制台中抛出错误。
同一站点运行良好http://xxxx:3000 它运行良好。没有问题。
我还缺少什么?
注意:操作系统是 Amazon Linux,我已经使用示例帮助世界节点 js 程序测试了相同的配置,它工作正常。
【问题讨论】:
标签: node.js amazon-web-services nginx nginx-location nginx-reverse-proxy