我的应用在线: http://vps465.ns.planethoster.net:8090/rto/
我使用端口8090,因为Glassfish在同一台服务器上使用8080。
nginx配置文件说:
server {
listen 80;
server_name realtimeopinion.com www.realtimeopinion.com;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
location / {
proxy_pass http://localhost:8090/rto/;
#proxy_set_header X-Real-IP $remote_addr;
}
}
然而http://www.realtimeopinion.com重定向到404?
答案 0 :(得分:0)
点击谷歌浏览器的实时意见链接,打开调试器显示nginx正在转发由glassfish(位于端口8080上)生成的404响应,而不是tomcat(这是8090,你真正想要的地方)去)
所以我认为你的配置文件是正确的,除了现在运行的nginx工作是从不同的配置文件,或者可能是先前指定端口8080的配置文件的早期版本。在第二种情况下,也许你只需要重新启动nginx?