PDA

View Full Version : Domain names on a dedicated server


ThePhantom
5th June 2007, 12:34
Hi,

I didn't want to hijack the Hosted vs Dedicated Server thread so I'll start a
new one.

I have a dedicated server running Linux/Fedora and it's great but I have one major problem with hosting multiple web sites on it.

[I've had to mask the links below because I'm not allowed to post them]

My dedicated server has an IP address and the sites hang off that e.g. htp:/12.13.14.15/siteOne, htp:/12.13.14.15/siteTwo etc. I have some nice .co.uk domain names registered with 123-reg but I can't seem to find a way to point them to individual sites on my server.

For example, I'd like someone to go to ww.SiteOne .co.uk and have all the links showing properly e.g. ww.SiteOne .co.uk/TandC.html rather than htp:/12.13.14.15/SiteOne/TandC.html

In 123-reg, the nearest I can get is Framed Web Forwarding on ww.SiteOne .co.uk but this is truly awful as it's a frame with my site inside it and also the links inside the site still point to 12.13.14.15.

I realise I can change 12.13.14.15 to be htp:/ww.MyServer.net/SiteOne/TandC.html but I'm still after visitors and search engines seeing ww.SiteOne .co.uk/TandC.html.

Any Ideas ?

Thanks !

AlphOmega
5th June 2007, 12:48
You will need to create a virtualhost. In fedora httpd.conf is located at
/etc/httpd/conf/httpd.conf

If you only have shell access type into the command prompt
nano -w /etc/httpd/conf/httpd.conf

At the bottom of the file uncomment this line

NameVirtualHost *:80

at the very end of the file add your virtual host eg

<VirtualHost *:80>
ServerAdmin <your email address>
DocumentRoot <path to the website>
ServerName www.SiteOne.co.uk
</VirtualHost>

Press CNTRL + Q then press Y to save

Then type in the shell service httpd restart and hit enter

As long as the DNS A record is pointing to your server this website will now appear under www.SiteOne.co.uk

Subbynet
5th June 2007, 13:14
While AlphOmega is perfectly correct with that answer, its not a solution I would offer because its quite technically challenging to inexperienced administrators.

You really need a Server Control Panel like Plesk (http://www.swsoft.com) - or even a free Open Source one like VHCS (http://www.vhcs.net).

Most Web Hosting companies do offer a Control Panel, so I would ask.

Regards,

Martin

ThePhantom
5th June 2007, 16:39
Brilliant, just the job thanks.

I've made the server changes and it looks OK. Just a few problems with the DNS settings to sort but shouldn't be a problem.

Many Thanks.

ThePhantom
5th June 2007, 17:12
The DNS changes have propagated and it all works fine.

Now to set up a nameserver :-)

Cheers!