Adrian Black's picture

HI all

I have a functional lamp deployment running using amazon ec2/ebs and elastic IP

( I have a domain name and have redirected it to the amazon ip)

It all runs smoothly, except for a minor niggle

 

When I goto ww.my_domain.com/moodle it takes me to the right place, but shows the ip address in the navigation bar.

I would like it to show www.my_domai.com/moodle

 

Can I approach this from within turnkey,  or do I have to reconfigure my amazon ip, or put in a request to my domain supplier (I have only the name - no storage attached to it)

 

Any help appreciated

Forum: 
Jeremy Davis's picture

Do you mean that your domain redirects from somewhere else to your server IP? If so, that'd be your problem. Ideally you need to adjust your DNS to point directly to your server.

Adrian Black's picture

Yeps that what I mean - I have the main site redirecting (through cpanel) to the elastic ip

 

I was wondering if I could do the dns from within turnkey or do I have to send an email to my supplier and get them to do it ?

Adrian Black

(Teacher - e-learning designer - ex I.T)

Jeremy Davis's picture

And you do that with whoever you bought your domain name from. Often if you have hosted/shared webspace (sounds like you might do - using cpanel) then your host is probably also your DNS provider. But perhaps not?

They can be separated (DNS and hosting). Usually they'll have a page where you can change the settings yourself. You'll need to adjust the A record to point straight to your elastic IP (currently it probably points to your hosted webspace). If you are no longer using your webspace then you can ditch that bit and just leave the domain with them, or you could tranfer your domain to someone else (Amazon do that too but not sure how competative their pricing is).

If you still wish to use your current webspace and have your TKL server as a subdomain, I'm pretty sure you need to add a new A record for the FQDN of your TKL server pointing to the elastic IP. And leave an A record pointing to your existing server. So it'd go something like this:

www.my_domain.com.  IN  A xxx.xxx.xxx.xxx
moodle.my_domain.com. IN  A  yyy.yyy.yyy.yyy

Where xxx.xxx.xxx.xxx is your existing shared server IP and yyy.yyy.yyy.yyy is your TKL Moodle elastic IP.
And if you want the base domain to be the same as www then add this CName record too (possibly already exists):

my_domain.com. IN CNAME  xxx.xxx.xxx.xxx

In my experience most domain providers only require you to select the record type, fill in the domain name and the IP address, but if for some reason yours needs you to do the full line, don't forget the trailing dot after the domain name.

If you don't want to do a subdomain and want it to be a subfolder instead (ie www.my_domain.com/moodle not moodle.my_domain.com) then I'm not 100% sure how you do that.

Adrian Black's picture

Many thanks for the detailed answer - that is exactly what I was looking for.

(I never got to grips with all of the A-name and C-name stuff :-)  )

 

Will give it a try today

Adrian Black

(Teacher - e-learning designer - ex I.T)

Jeremy Davis's picture

It's like a lot of things... They can seem daunting initially but once you know your way around a bit, it's not too hard.

A records are the main ones (the A stands for address) and CName records are sort of like alias records (I don't recall what it stands for). CName records can be useful if you host multiple sub domains on the same server. The only other record type really worth knowing for this level of adjustment are MX records; they are the ones for your email server.

Oh and if your domain name provider is different from your DNS provider then you'll need to give the NS (name server) records of the later to the former (but to just point to your AWS instance you shouldn't need to worry about that.

Add new comment