Web Hosting Talk







View Full Version : 2 domains, 1 website


Robski
03-21-2004, 11:47 AM
Hi there,

I have about 8 domains running on my dedicated server with Apache and Plesk. I would like to have two of these domains point to one website (domain.net should be an exact mirror of domain.com, not a redirect). While doing some research I came across definitions like "domain parking" and "aliases". What is the best solution?

Example: free-games-online.com is an exact mirror of freeze.com
Sorry, I'm not allowed to post urls/direct links yet.

I've been searching for a solution all weekend. I would *really* appreciate it if someone could give me a step-by-step tutorial, as I'm not experienced with Linux nor Apache.

I searched this forum for a solution as well, but couldn't find a detailed explanation. I hope someone can help me out.

Looking forward to hearing from you, thanks in advance!

Rob

Jasber
03-21-2004, 12:33 PM
I don't have Plesk, so I don't know for sure, but you should be able to park free-games-online.com to freeze.com.

In CPanel here's a tutorial: http://www.demologic.com/X2Skin/HowToParkOrPointNewDomainsToMyAccount.html

I am not sure if that helps, but if might give you something to look for.

Robski
03-21-2004, 12:44 PM
Plesk doesn't seem to have that option.

PS: free-games-online.com and freeze.com are not mine, free-games-online.com is an example of what I would like on my own domain.

Robski
03-21-2004, 12:55 PM
Here's something I've tried:

pico /etc/httpd/conf/httpd.conf

Then, on the last line of httpd.conf, I added:

<VirtualHost 111.111.111.111>
ServerName *.domein1.com
DocumentRoot /home/httpd/vhosts/domein1.com/httpdocs
</VirtualHost>

<VirtualHost 111.111.111.111>
ServerName *.domein2.com
DocumentRoot /home/httpd/vhosts/domein1.com/httpdocs
</VirtualHost>

* = www, since i can't post urls here yet

Both with valid IPs and paths of course.

Then i restarted httpd and named server. Didn't work. Domain2.com was still unchanged.

youandme
03-21-2004, 03:25 PM
i dont think that Plesk can park or alias domain like CPanel :) so u cant do ! i have experence with plesk for 1 year :D Plesk is my 1st opinion

NikeAero1080
03-21-2004, 04:54 PM
Just out of curiousity, why don't you just have the .net go to the .com? I'm doing that for a site my company is working on.

Robski
03-21-2004, 06:24 PM
Originally posted by NikeAero1080
Just out of curiousity, why don't you just have the .net go to the .com? I'm doing that for a site my company is working on.

That would be a redirect. I would prefer to have both domains having the same content.

NikeAero1080
03-21-2004, 06:35 PM
Let me ask you this. Are you having 2 seperate "sites" with the exact same content? A .com and .net for example? If so, why are you using double the space? Why don't you want redirect?

Robski
03-21-2004, 07:25 PM
Originally posted by NikeAero1080
Let me ask you this. Are you having 2 seperate "sites" with the exact same content? A .com and .net for example? If so, why are you using double the space? Why don't you want redirect?

No, they're different domains. There used to be a website on the one I now want to connect to the other. Why no redirect? I'm not sure, a matter of preference I guess. I'd prefer this method, if I can ever get it to work. Basically, I prefer the fact that the domain would still be in tact, not just a redirect.

Haven't heard any advice yet, can someone help me out?

NikeAero1080
03-21-2004, 07:28 PM
I haven't used Pleske however I believe it works like many other systems. You have to change the DNS numbers of the domain to point to your server and then have that folder (the site) get called up by the domain. Try doing that for both domains. You may also want to contact Pleske direct.

Brightadmin
03-23-2004, 01:31 AM
Hi,

You can try with the following:

pico /etc/httpd/conf/httpd.conf

Then, on the last line of httpd.conf, I added:

NameVirtualHost 111.111.111.111
<VirtualHost domain1.com >
ServerName domain1.com
DocumentRoot /home/httpd/vhosts/domain1.com/httpdocs
</VirtualHost>

<VirtualHost domain2.com>
ServerName domain2.com
DocumentRoot /home/httpd/vhosts/domain1.com/httpdocs
</VirtualHost>


Restart httpd .

For WWW edit the DNS entry for each domain and add the following line :
For domain1.com

www IN CNAME domain1.com

For domain2.com
www IN CNAME domain2.com

restart named.

May be it solve your problem.

Regards,

Bright:)

are_eye_see_
03-23-2004, 03:49 PM
in plesk you should be able to direct the main url to whatever site you want, regardless of the domain name. If not edit th httpd.conf file to point that domain to the site you want. It means usin up a domain license, but that might be a workaround. Another thing...parking or fowarding a domain won't make it any more or less valid. Depending on how you wrote your site.

Robski
03-23-2004, 04:16 PM
The reason the VirtualHost tags aren't working is because my httpd.conf file seems to be corrupt in some way. I better have that checked out.

Thank you all very much for your support. I will definitily use your advice in this thread (i bookmarked it) and will forward the domain in the meantime.

Thanks!

markjut
03-23-2004, 04:55 PM
I can do it in cPanel but not in plesk

Mike25
03-23-2004, 08:17 PM
You may want to try using a SeverAlias statement under the <VitualHost> tag for your primary domain.

loopforever
03-23-2004, 08:54 PM
Originally posted by Mike25
You may want to try using a SeverAlias statement under the <VitualHost> tag for your primary domain.

I'd suggest this method also. Here's a basic example:

<VirtualHost your.ip.address.here>
DocumentRoot /path/to/document/root
ServerName maindomain.com
ServerAlias maindomain.com www.maindomain.com otherdomain.com www.otherdomain.com
</VirtualHost>

That's all :).

FrzzMan
03-24-2004, 02:32 AM
Yes, this is the right way...

I have 4 domain for just one site currently. The only problem you have to face is the cookie on visitor machine, it can't be recognized once the visitor access your site by multiple domain.