T
T
TijAY2011-12-07 09:50:24
Nginx
TijAY, 2011-12-07 09:50:24

Question about nginx

Faced a problem in work, I hope nginx.

There is such a scheme:
image

NAT is configured on the gateway with port forwarding to the internal network. On one of the internal servers there is a virtual machine with a network adapter in bridge mode and its own IP from the same zone as the rest of the network. The virtual machine has Ubuntu Server installed with nginx.

The crux of the matter: when I make a request to port 80 from the internal network, I get the “correct” response in the form of a website. If I make a request from the outside that is NAT translated to the inside, nginx returns the default page: Welcome to nginx!

I'm not a big nginx specialist, I also don't have access rights to the virtual machine, so I can't see the settings. And I would like to know if there is such a thing in nginx, the setting of which will lead to such a picture as I described.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Burov, 2011-12-07
@BuriK666

see server_name/server_alias
If it matches what is specified in the HTTP/1.x headers, then nginx will process it in this section server {}
If not found, it will process it in the first section server {}
Remove all unnecessary servers from the nginx configs.

T
TijAY, 2011-12-07
@TijAY

Thank you! I needed someone else's opinion, which would confirm the correctness of my guesses. I will require admin rights on the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question