View Full Version : Second domain on account and visible URL

06-05-2008, 02:46 PM
I have an account that allows me to host five domains, only one of which has been used until yesterday, when I added a second domain that I've had registered for a while.

This is the first time I've gone through the process, but with the help of WH tech, I mostly have it figured out. When you enter the URL for the second domain, example.info, into Firefox, it now leads to maindomain.org/var/www/html/example/index.htm. The DNS for example.info was changed to ns1.west-datacenter.net, ns2.west-datacenter.net yesterday.

However, I want the URL to remain as example.info in the browser, not suddenly change to maindomain.org/example/ , which is where the index.htm is for example.info.

My confusion is this - when you enter the example.info URL into the browser, it knows where to go, so doesn't that mean the DNS has propagated? Or am I wrong on that? Do I just have to wait a little more to have example.info stay as example.info in the browser? Or do I have something not set right in the maindomain.org manager?

Thanks for any help, and my apologies for not knowing this already. I will the next time I add another domain.

Black fucking (http://www.fucktube.com/categories/297/fucking/videos/1)

06-06-2008, 06:27 AM
It could be that the domain has not fully propagated yet and that your browser is showing you a cached version of your domain if you where "checking" things out before you set up the second domain. If you have set the path for the second domain to /var/www/html/example/ then it should start showing up without the maindomain.com in time. If you are not sure you have things set up correct ask West Host to check your settings. They can log in and make sure you have it set up right. :)

06-06-2008, 06:50 AM
Thanks, Shawn.

It still hadn't propagated, it seems - still showing with maindomain on the front. I did clear the cache, but I have a vague recollection of a hosts cache somewhere. I'll look into that.

If I've made no progress by Monday, I'll contact WH tech again.

COACH HANDBAGS (http://icoachhandbags.com/)

06-10-2008, 04:45 PM
It wasn't a DNS problem. When I checked with WH tech yesterday, I was referred to a forum post on emails on multiple domains on one account. It was very long, very involved, and would have taken me hours to understand. But the one thing I did glean from it was that the second domain shouldn't have been in /var/www/html/second-domain, it should have been in something like /var/www/vhosts/second-domain. That worked. However, it seemed to me that the WH help files I consulted recommended the first path. They could use some editing.

Now, my next problem:

I am trying to do a non-www. to www. .htaccess rewrite for the second domain, which won't redirect for some reason. The code is the same as what I've used on the primary account for years, and works fine for that. Does anyone know if there's a problem using it in a second domain? The path is as above. The code is as follows:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.info [NC]
RewriteRule ^(.*)$ http://www.example.info/$1 [L,R=301]

Thanks for any help,
Vf1100S (http://www.cyclechaos.com/wiki/Honda_VF1100S)

06-10-2008, 09:16 PM
Now that you have moved the main domain public root you have to activate mod_rewrite for the directory where the second domain is. This post should get you going: http://forums.westhost.com/showthread.php?t=10235

That should also allow you to run cgi scripts in the directory if you need to.

06-11-2008, 08:12 AM
Brilliant, Shawn. That did it. It's the first time I've even looked at the httpd.conf - was always afraid I'd destroy something.

Thanks again, man.

Lovely Wendie99 (http://www.lovelywendie99.com/)

06-11-2008, 04:32 PM
Happy I could help out. :) Remember when dealing with editing the httpd.conf you should always make a back up of the original before you make the changes. I often download the current copy to my local computer. Make my changes and then before I upload it I rename the orginal on the server to something like backup_httpd.conf. I then test to make sure that Apache restarts and if there is a problem I can quickly delete my new copy on the server and rename my backup.