Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've recently purchased a VPS hosting (rackspace) and want to configure a domain for this account. I've configured nginx and other stuff to run Ruby on Rails on it. And everything works perfectly when I reach it by its ip. I've changed the domain DNS servers at my domain registrant to point to my hosting. I've been waiting for 48+ hours but still no luck. Maybe I should add some configuration on the server side? Please help.

Thanks.

share|improve this question
    
Does the domain correctly resolve to the VPS's IP? host domain.tld, replacing domain.tld with the actual domain, will give you the answer for that. If that resolves, then it's probably a config issue and I can help with that. –  Thomas W. Jun 2 '13 at 19:24
    
Should I run this command via terminal? host domain.ltd? –  Dima Knivets Jun 2 '13 at 19:32
    
If yes, it doesn't return anything. –  Dima Knivets Jun 2 '13 at 19:38
    
replace domain.tld with your actual domain though when you run the command via the terminal. If you don't have one, then that's the first thing you need to go get. –  Thomas W. Jun 2 '13 at 19:38
    
I understood, I've replaced and run this command via terminal and it returned nothing. –  Dima Knivets Jun 2 '13 at 19:39

1 Answer 1

up vote 2 down vote accepted

We discussed this in a chat room here, however this is the brief summary:

  1. Make sure you have a domain name.
  2. Make sure that the domain points to your provider's name servers.
  3. Make sure that an A record exists (for IPv4) in the provider's name servers which points your domain to the correct IP for your VPS. If it's an IPv6 address, use an AAAA record.
  4. Make sure that nginx has a server_name line in the configuration for the server { block which has the domain name in it.

And you're done.

To add additional sites in nginx, make additional server { blocks in the configuration file with the relevant configuration data, after making sure the domain points to the IP address for your server, and that the server_name lines contain the domain name(s) in that line for each relevant site root directory on the server.

share|improve this answer
    
+1 for good explanation –  Shrayas Nov 12 '13 at 17:09

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.