IP as a server name

Hi there!

I have a question about nginx configuration file. How can I configure a
server if I want my site to be available under a domain name and IP
address. I would like to have something like:
to be available simultaneously.

I noticed that it basically works but problem occurs on redirections
from my webapp (Nginx is a reverse proxy for it). It seems that on
redirects nginx is obtaining a server_name from OS configuration.

Can You please suggest some configuration?

I am using nginx 0.6.39 but will try to upgrade if it is necessary.



Posted at Nginx Forum:

Ok found it. Sorry.

server_name_in_redirect off;

did the trick.

Posted at Nginx Forum: