PDA

View Full Version : Multiple Domain Setup Question



danb
09-09-2004, 12:52 PM
Hi,

I am in the process of setting up a site that I will be adding to my Ultimate package.

While sharing the cgi-bin directory with the base site, I want everything else to live under the, in this example, /var/www/html/abc/ directory.

As I am moving files over, but before transfering dns, I find that html references to /include/, etc., go to the base domain /var/www/html/include/ when in fact I want them to go to /var/www/html/abc/include/.

How can I accomplish this ?

Thanks!
Dan

wildjokerdesign
09-09-2004, 01:27 PM
Right now you are using an absolute path to the include directory by adding "/" at the front. This is telling the browser to look for the directory from the Document Root which is set in /ect/httpd/conf/httpd.conf . Once you add the new domain to your account and set the Document Root for it then the refrence should work. You could change it to a relitive path by removeing the "/" at the front wich well make the browser look for the directory form where the page that called it from resides.

Is that what you where looking for?

danb
09-09-2004, 02:10 PM
That sounds like the right direction :D. I have already added the domain names thru the Domain Management area, but only see the basic 'DocumentRoot' entry. Would I add an additional entry there for the additional domains, and in what format, as it does not give an example.

Thanks!
Dan

wildjokerdesign
09-09-2004, 04:36 PM
Where you looking at the httpd.conf when you speak of only seeing the basic 'Document Root' entry? There should be entries at the bottom of that file for second domain that look something like this:

<VirtualHost *>
ServerName abc.com
ServerAlias www.abc.com
DocumentRoot /var/www/html/abc
</VirtualHost>

If you are speaking of in the Site Manager (bit rusty since haven't done it in awhile so going on memory) then you should be able to see a list of domains when you go the Domain Management. If you click on the edit icon that is to the right of the abc.com domain then it should pop up a window that allows you to enter the Web Root (different name used here). Most likely you'll see that default is selected if you select custom you can then enter /var/www/html/abc in the text box to the right of that.

This also makes me think of something else. You may need to create an aliase for your new domain to the cgi-bin. I don't remember if it is created by default. Once you have done the above if go back to the new domain and are having problems with your scripts then look under Aliases in the Site Manager > Domain Management. You should see the one set up for the main domain. If you need to set it up then you would click on the new domain while you are on that Aliases screen and then New Aliase button at the bottom. The type you are setting up is a 'script alias'. You can view the settings on the main one with it's edit button first if you want to see how it is set up. I think it well be obvious.

Let us know if there is anything else you need... or if I left something out. :)

danb
09-09-2004, 06:14 PM
Ooops, I should always read all the way to the bottom :wink:

But it still looks like I cannot set up a complete working environment. It appears that for everything to be pointing to the right places, I actually have to make the DNS switch. Until then I still come up short.

In the past, when I have moved a site, I would duplicate the site on the new server, and when I was ready for the move would submit the DNS change, and then modify the index.html file on the site moving to instead have it do a jump to the new ip address using a META tag like the following:

<META HTTP-EQUIV="Refresh" Content=0;URL="http://206.130.98.234/">

That way folks going to the old site automatically get kicked to the new site via ip address until the DNS change propagates around and I only have to update one site. Additionally, other than the ip address in the url, all else remains and functions exactly the same on the new site.

With the name based setup here, that is not the case and I unfortunately did not anticipate that.

I went with the Ultimate package to host all three of my personal domains, but it now appears that I should have used individual packages instead, unless I am totally missing something here.

Any other suggestions or guidence would be appreciated :) .

For specifics, here are links to both the current site I want to move, and the new location. Maybe something there will be more obvious than my explanation ;) .

current location: http://www.a-league.com/
new location: http://www.dansoccerzone.com/a-league/html/

wildjokerdesign
09-10-2004, 06:40 AM
Ooops, I should always read all the way to the bottom :wink:
Yes that seems to be a problem I have quite often. :)


... using a META tag like the following:

<META HTTP-EQUIV="Refresh" Content=0;URL="http://206.130.98.234/">Well you do have a dedicated IP so you could almost do this but would be a bit more work since you would most likely have to modify all scripts and such to use the IP instead of a domain name. Would most likely have to do some modifications to the httpd.conf to really make it work. Not sure how worth it it would be since normally a DNS change only takes 24-72 hours to propogate.



I went with the Ultimate package to host all three of my personal domains, but it now appears that I should have used individual packages instead, unless I am totally missing something here.
The only other thing you could have done was go with the Ressellers1 package. This gives you up to 10 domains and they are all on thier own vps. It would have cost extra to get dedicated IP's for anything over the main account domain but you then would have lots of extra spots for future domains or if you wanted to sell the extra space to someone else. I went that way because I figured in the long run it was a better value. I have three sites of my own then the others used by clients.


Any other suggestions or guidence would be appreciated :) .I'll take a look at the sites a bit latter and see if anything comes to mind.

danb
09-10-2004, 07:10 AM
All the meta tag redirect accomplishes is to push folks to the new location. I can't use the domain name because dns has not propagated yet, so the ip address is used to push to the right location.

At the target site, as long as base references are specified as '/' in the templates and code as opposed to 'http://www.abc.com/', then the ip address is what shows in the 'www.abc.com' spot, but other than that, the site functions completely normal. As dns propagates, you can actually tell because once your name server gets updated, the url will change from being dsplayed as 'http://ipaddress/' to 'http://www.abc.com/'.

As long as things are already setup correctly on the new site, no other changes need to be made.

Clear as mud, right ?!? ;)

danb
09-10-2004, 07:44 AM
Well, since it looks like I did not plan as good as I thought, and it is simpler at this point, I have ordered a Deluxe package to host this (a-league.com) particuler site. I have full production locations that can't be down and the transfer needs to be nearly transparent. A pain, I know ;)......I spoil my users :D !

Thanks for all the help.

wildjokerdesign
09-10-2004, 08:43 AM
No problem any time .... I tend to spoil my users also. :)