Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two IPs mapped on my host:

1.2.3.4 and 11.22.33.44 ("fail over" IP)

I'm working on a website that don't have a domain name for now. I'd like to serve it under 11.22.33.44 until I have a domain name for it.

So, I'd like to create a server block on Nginx that would serve only the requests sent to the fail over IP 11.22.33.44. (Other sites are already configured on the other IP).

Is it possible to do that?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use listen parameter in server block for that.

e.g.

server {
  listen 1.2.3.4:80;
  ...
}

And:

server {
  listen 11.22.33.44:80;
  ...
}
share|improve this answer
    
Great! I'm going to try that! –  John Smith Optional Aug 26 '13 at 11:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.