Creating a Subdomain Ubuntu

Problem

Creating a Subdomain Ubuntu with load balancers.

Solution

The AA record of the subdomain needs to be updated for these to work then you can get the DNS details by clicking on the site->load balancers ->description tab

On Ubuntu Side

These are the spteps to follow:

1) Create a folder in the sites eg. subdomain.domain.com

2) Create a virtual host (can get as an example the local ones or the ones that exit) at /etc/apache2/sites-available/

3) Enable the site by running this command sudo a2ensite subdomain.domain.com

4) run this sudo /etc/init.d/apache2 reload

On Domain Provider

The A record must point to the server/s in the loadbalancer

CNAME records:- CNAME records need to be pointing to the loadbalancer.

Also when entering hostname to point to points, e.g. on netnames, these two both need to have the fullstop at the end like so:

Hostname subdomain.domain.org.uk.

Points to

dualstack.cjd-9999.eu-west-1.elb.amazonaws.com.

you can also check by giving this command: bash nslookup subdomain.domain.org.uk

or here http://downforeveryoneorjustme.com/http://subdomain.domain.org.uk/

Peadlock

The padlock only appears if there is web redirects, this needs to be removed in order for the A records to be changed.

You can also set to use Google's own DNS servers so when you do a nslookup you will get something like: Server:             8.8.8.8 Address:          8.8.8.8#53

nslook up using google public dns example

nslookup beta.domain.org.uk 8.8.4.4 or nslookup beta.domain.org.uk 8.8.8.8