| Linode Forum https://forum.linode.com/ |
|
| [Solved] 2 domains -> 1 site https://forum.linode.com/viewtopic.php?f=19&t=8116 |
Page 1 of 1 |
| Author: | mrneilypops [ Mon Nov 28, 2011 11:09 am ] |
| Post subject: | [Solved] 2 domains -> 1 site |
I would like to point another domain to my http://houghton.co site. The second domain is http://neilhoughton.com. I have tried editing my VirtualHosts but so far I am unable to make this work. Any help would be much appreciated. EDIT: I think I fixed this. If someone could confirm that this looks correct I will mark the post SOLVED. /etc/apache2/sites-available/neilhoughton.com <VirtualHost 178.79.134.46:80> ServerAdmin neilandjune@gmail.com ServerName neilhoughton.com ServerAlias www.neilhoughton.com DocumentRoot /srv/www/houghton.co/public_html/ </VirtualHost> |
|
| Author: | glg [ Mon Nov 28, 2011 3:19 pm ] |
| Post subject: | Re: 2 domains -> 1 site |
do you have a different virtualhost for houghton.com? if so, just add both of these to serveralias in that one. no need to have a separate vhost |
|
| Author: | hybinet [ Mon Nov 28, 2011 4:40 pm ] |
| Post subject: | Re: 2 domains -> 1 site |
mrneilypops wrote: nano /etc
Huh? |
|
| Author: | bandgeekndb [ Sun Dec 04, 2011 12:01 am ] |
| Post subject: | |
So, based on your edit, it looks like you have two virtualhost entries, one for houghton.co and one for neilhoughton.com? If they're redirecting to the exact same set of documents on your server, you only need one virtualhost declaration that would look something like this: Code: <VirtualHost *:80> I do this on one server of mine a lot, to park purchased domains to our company's home page until they are associated with their respective codebase. Also, your VirtualHost line starts with the IP and port 80, as opposed to mine, which is *:80. Unless you have multiple IP addresses and need to explicitly make sure one site answers on one IP and another answers on another IP, either way works in your case. I honestly don't know if there is a "best practices" way to do it, as I'm only a newbie to being a sysadmin. Everything I've learned is through Google, and Linode's documentation, so take my advice with a grain of salt, it may not be perfect |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|