mesos - nginx reverse proxy configuration issue
为情所困
为情所困 2017-05-16 17:14:44
0
4
648

There is a backend service http://10.18.35.158:8080
I want to use nginx reverse proxy

I want to achieve the following access method, that is, http: How to configure //ip/mesos and http://ip/marathon?

为情所困
为情所困

reply all(4)
阿神

Change location /mesos/ to location ~/mesos/(.)*
Change location /marathon/ to location ~/marathon/(.)*
Try it

黄舟

Conclusion: The poster probably made a mistake in the path behind the proxy. The access path behind the proxy is http://10.18.35.158:8080/meso...
So the poster tried to access this path to see if it got 404, and then checked. Is it for other reasons?

滿天的星座
upstream mesos_servers {
    server  192.168.0.2:5050;
}
upstream marathon_servers {
    server  127.0.0.1:8080;
}

server {

    listen 80;
    server_name xxx.com;

    location /mesos/ {
        proxy_pass http://mesos_servers/;
    }

    location /marathon/ {
        proxy_pass http://marathon_servers/;
    }
    location ~ ^/static/  {
        proxy_pass http://mesos_servers;
    }

}
滿天的星座

/mesos/ Remove the trailing slash -> /mesos

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template