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:
http(s)://myhost.mydomain/foo/
and
http(s)://XXX.XXX.XXX.XXX/foo/
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.

Regards

SÅ‚awek

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,201092,201092#msg-201092

Ok found it. Sorry.

server_name_in_redirect off;

did the trick.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,201092,201100#msg-201100

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs