DNS Questions

Hello everyone,

I have to say that I have next to zero knowledge of DNS. I was looking at my dns manager to setup because I want to set up a subdomain for a forum. I have a few questions.

1. Is this correct:

NS Records

Name Server Subdomain TTL Options

ns1.linode.com http://www.astrocospace.com Default Edit | Remove

if so why is my domain listed under "Subdomain"?

2. I created the forum subdomain per the tutorial I understand that a reverse dns had to be set to it. So I assumed incorrectly that the domain name would be forum.domainname.com when asked for that information to lookup. However that didn't work. So I tried forum.www.domainname.com and that worked. I am now completely confused as to how this works.

3. My SOE Record is as follows:

Domain Settings and Defaults

Domain

http://www.astrocospace.com Example: ns1.domain.com

SOA email

anemail@gmail.com Your email address

Should this be set to astrocospace.com or leave it as is?

4. How do I get my subdomain to work?

This is my site enabled .conf settings:

# The ServerName directive sets the request scheme, hostname and port that

the server uses to identify itself. This is used when creating

redirection URLs. In the context of virtual hosts, the ServerName

specifies what hostname must appear in the request's Host: header to

match this virtual host. For the default virtual host (this file) this

value is not decisive as it is used as a last resort host regardless.

However, you must set it for any further virtual host explicitly.

ServerName http://www.example.com

ServerName astrocospace.com

ServerAdmin webmaster@localhost

ServerAlias http://www.astrocospace.com http://www.astrocospace.com http://astrocospace.com astrocospace.com

DocumentRoot /var/www/html

DirectoryIndex index.html index.php

Available loglevels: trace8, …, trace1, debug, info, notice, warn,

error, crit, alert, emerg.

It is also possible to configure the loglevel for particular

modules, e.g.

LogLevel info ssl:warn

ErrorLog ${APACHELOGDIR}/error.log

CustomLog ${APACHELOGDIR}/access.log combined

For most configuration files from conf-available/, which are

enabled or disabled at a global level, it is possible to

include a line for only one particular virtual host. For example the

following line enables the CGI configuration for this host only

after it has been globally disabled with "a2disconf".

Include conf-available/serve-cgi-bin.conf

ServerName forum.astrocospace.com

DocumentRoot /var/www/forum/

vim: syntax=apache ts=4 sw=4 sts=4 sr noet

I am more than happy to help with any other info you may need and thank you in advance for any and all help received.

5 Replies

Need to add the domain to the dns manager as just astrocospace.com then create the forum and www subdomains to the zone. That'll fix it.

In DNS land astrocospace.com is your domain name. http://www.astrocospace.com is actually a subdomain where www is the name of the subdomain.

Same as forum.astrocospace.com where forum is the subdomain

Also in DNS you have what is called a FQDN = Fully Qualified Domain Name

This usually refers to the host name + the domain name of a physical (or virtual) computer. So if the host name of your Linode is server, your FQDN is server.astrocospace.com

There is nothing stopping you setting the name of your server to match a subdomain used by Apache if you want.

Reverse DNS is usually setup to point to the host name of your server. This really comes into play when setting up a mail server.

I don't use the Linode DNS control panel, so I'm not sure where which bits go to set this up.

In your Apache config:

> ServerName astrocospace.com

ServerAlias http://www.astrocospace.com http://www.astrocospace.com http://astrocospace.com astrocospace.com

Don't include the http:// bit

ServerName astrocospace.com

ServerAlias www.astrocospace.com

Also, when you change your DNS, it will take up to 24 hrs for it to propagate the internet (update so all DNS servers see it)

Thank you both very much that is exactly what I needed to know. However I have one question about the subdomain. Referencing my first post is the site-enabled conf setup correctly? ie this

ServerName forum.astrocospace.com

DocumentRoot /var/www/forum/

DirectoryIndex index.html index.php

It should look like this:

ServerName forum.astrocospace.com

DocumentRoot "/var/www/forum"

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