Help with Subdomain Configuration

Hello,

I'm sorry but I need some help with configuring a subdomain on my VPS.. I'm not really good with things when it comes to the whole A, CNAME, AAAA records thing - I much prefer to open notepad and start typing up some PHP.

Anyway, so I have my domain at http://www.example.com registered with Gandi and changed it's nameservers to point to the Linode VPS and setup nginx and everything is working great! Now however; I would like to add a subdomain and I've tried to set it up but I"m not sure what I've done wrong.

First I went into Linodes DNS manager and set up a new A record for sub.example.com and pointed it to my Linode VPS ip address.

Then I added the following to my nginx configuration just below my main configuration for my website:

> server {

listen 80;

server_name sub.example.com

location / {

root /path/to/folder;

}

}

Lastly I reloaded the nginx configuration and restarted the nginx service and when I try to navigate to sub.example.com I get a time out error and when I try to ping sub.example.com it resolves to a filler IP address (123.123.123.123). Did I do something wrong or am I missing something? Any help would be greatly apprecaited - thanks :)

2 Replies

If it doesn't resolve to a valid ip, it's not getting to your server for nginx to render a page.

Double check your DNS setup.

and as vonskippy's signature says, give us your domain name. there's no reason not to and we can probably help you more if you tell us what it is.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct