I am new to nginx, I have configured my consul with nginx.
It's working but I have few doubts in my configuration.
here is my configuration
upstream consul {
server 127.0.0.1:8500;
}
server {
listen 80 default_server;
server_name localhost;
location / {
proxy_pass http://consul;
}
}
this is working fine if hit http://localhost, in my machine I am able to see consul UI.
But If I change my location to /consul, it is giving 404.
and what is the use of server name, if I change it to server_name mylocalserver;
I think I should be able to run my gttp request on this address http://mylocalserver. but that is also not working.