Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am running a ec2 instance, and I had a wordpress blog on that server for domain#1.

Today I pointed domain#2, setup the directory and nginx etc.

Going to I am seeing the content for domain#1.

What do I have to do so each domain is mapped correctly? I thought that was what the nginx file was for that I created for each domain?

share|improve this question
How did you add domain#2 to the nginx config? – Sim Jun 7 '10 at 4:25
not to the config sorry, but to the available-sites and enabled-sites symbolic link. – Blankman Jun 7 '10 at 14:06

Virtual Hosts are your friend.

share|improve this answer
i did this, except I have 2 files that, one for each domain in my available-sites. – Blankman Jun 7 '10 at 15:02
are the files actually included into the running configuration? what happens when you paste them into the main config as one file? – troyengel Jun 8 '10 at 8:54

You have to put the domain#2 top of the domain#1 in your config

share|improve this answer

Your Answer


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.