0

I am using NGINX with proxy pass to act as reverse proxy. On the backend, we have only one server.

http://localhost:5000/index.html
http://localhost:5000/default.html

I have following condition in nginx.conf

location /one/ {
                        root http://localhost:5000;
                        proxy_pass http://localhost:5000;
                        index index.html
                        
                }

 location /two/ {
                        root http://localhost:5000;
                        proxy_pass http://localhost:5000;
                        index default.html
                         
                }

Issue: Whether I request location one or location two, system always load the index.html page.

What changes I need to make to fix this issue.

SharpCoder
  • 18,279
  • 43
  • 153
  • 249

0 Answers0