Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Welcome, Actually I'm doing some experiments on my VPS with Ubuntu. I've installed MaraDNS with Nginx. At this moment I've correctly launch static site which is available from Internet (maindomain.com).

In next step I want to add new site which will be available in subdomain, for example dev.maindomain.com. I've tried to db.maindomain.com file (used by MaraDNS):

maindomain.com. xxx.xxx.xxx.xxx
www.maindomain.com. CNAME maindomain.com.
dev.maindomain.com. xxx.xxx.xxx.xxx

Where xxx.xxx.xxx.xxx is VPS IP address.

In nginx.conf I have:

server {
  listen 80;
  server_name maindomain.com;
  access_log /var/log/nginx/maindomain.com.log
  location / {
    root /var/www/maindomain.com;
    index index.html;
  }
} 
server {
  listen 80;
  server_name dev.maindomain.com;
  access_log /var/log/nginx/dev.maindomain.com.log
  location / {
    root /var/www/dev.maindomain.com;
    index index.html;
  }
} 

With this configuration maindomain.com works properly, but dev.maindomain.com isn't available.

When I try:

ping dev.maindomain.com

then I get my xxx.xxx.xxx.xxx IP.

Do you have any suggestions how can I resolve this problem?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.