Nginx proxy not redirecting when using url name?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
When I type in the IP address of the reverse proxy directly into my browser bar, it does perform the redirect.
When using a URL that is resolved via the /etc/hosts entry 203.0.113.2 git.example.com the "Welcome to Ngnix page" is shown. Any ideas? This is the configuration:
server
listen 80;
server_name git.example.com;
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
location /
proxy_pass http://203.0.113.1:3000;
One interesting thing is that I can navigate to for example:
http://203.0.113.2/issues
If I then change 203.0.113.2 with git.example.com I get Nginxs "404 not found" page.
docker nginx
add a comment |Â
up vote
0
down vote
favorite
When I type in the IP address of the reverse proxy directly into my browser bar, it does perform the redirect.
When using a URL that is resolved via the /etc/hosts entry 203.0.113.2 git.example.com the "Welcome to Ngnix page" is shown. Any ideas? This is the configuration:
server
listen 80;
server_name git.example.com;
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
location /
proxy_pass http://203.0.113.1:3000;
One interesting thing is that I can navigate to for example:
http://203.0.113.2/issues
If I then change 203.0.113.2 with git.example.com I get Nginxs "404 not found" page.
docker nginx
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
When I type in the IP address of the reverse proxy directly into my browser bar, it does perform the redirect.
When using a URL that is resolved via the /etc/hosts entry 203.0.113.2 git.example.com the "Welcome to Ngnix page" is shown. Any ideas? This is the configuration:
server
listen 80;
server_name git.example.com;
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
location /
proxy_pass http://203.0.113.1:3000;
One interesting thing is that I can navigate to for example:
http://203.0.113.2/issues
If I then change 203.0.113.2 with git.example.com I get Nginxs "404 not found" page.
docker nginx
When I type in the IP address of the reverse proxy directly into my browser bar, it does perform the redirect.
When using a URL that is resolved via the /etc/hosts entry 203.0.113.2 git.example.com the "Welcome to Ngnix page" is shown. Any ideas? This is the configuration:
server
listen 80;
server_name git.example.com;
proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
location /
proxy_pass http://203.0.113.1:3000;
One interesting thing is that I can navigate to for example:
http://203.0.113.2/issues
If I then change 203.0.113.2 with git.example.com I get Nginxs "404 not found" page.
docker nginx
docker nginx
asked 2 days ago
Ole
2531311
2531311
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f473701%2fnginx-proxy-not-redirecting-when-using-url-name%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password