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 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 www.domain#2.com 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

2 Answers 2

Virtual Hosts are your friend.

http://wiki.nginx.org/NginxVirtualHostExample

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

 
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.