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?
阿神2017-05-16 17:16:44
Change location /mesos/ to location ~/mesos/(.)*
Change location /marathon/ to location ~/marathon/(.)*
Try it
黄舟2017-05-16 17:16:44
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?
滿天的星座2017-05-16 17:16:44
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;
}
}