nginx:反向代理不起作用

时间:2017-12-07 10:18:07

标签: nginx nginx-location nginx-reverse-proxy

我有两个网站:

我想设置一个反向代理,如:

http://example.com/mybackendapp - > http://example.com:8080/mybackendapp http://example.com/mybackendapp/ - > http://example.com:8080/mybackendapp http://example.com/mybackendapp/all_sub_url - > http://example.com:8080/mybackendapp

在nginx.conf文件中,我将配置设置为:

location /mybackendapp/ {
    resolver 127.0.0.1;
    proxy_pass http://localhost:8080/mybackendapp;
}

修改文件后,我重新启动了nginx服务。但反向代理不起作用。当我尝试在浏览器中打开exemple.com/mybackendapp时。我有404错误。

你能帮我解决这个问题吗?

0 个答案:

没有答案
相关问题