[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Newbie - Virtual Sites
- Subject: Re: [cobalt-users] Newbie - Virtual Sites
- From: Rocky Hetherington <mailinglists@xxxxxxxxxx>
- Date: Fri Oct 20 12:40:09 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
At 21:18 18/10/2000, you wrote:
If I create a new virtual site (www.domain.co.uk) how can I get at the
site before it's published to the web - The site in question already
exists on another machine and I want to move it to the new server.
I have tried using the ip addres (eg 127.0.0.1/www.domain.co.uk) with no
success.
If it's got its own IP address then using the IP will bring it up. If it's
sharing an IP address with other sites (Name based hosting) then you wont
be able to do it as standard.
What you can do as a quick method is create a rewrite rule for your servers
main domain.
Say your server has the domain of http://www.server.com and the account you
are creating is called http://www.domain.co.uk then you can set it up so
that something like http://www.server.com/usersites/www.domain.co.uk will
go to the webspace of www.domain.co.uk prior to DNS changes being reflected.
You'll need to telnet/SSH in to do this. Here's the procedure:
1.) Telnet into server as admin.
2.) Type "su" and then your admin password when requested.
3.) Backup your httpd.conf file by typing "cp /etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf.backup
4.) Type "pico -w /etc/httpd/conf/httpd.conf"
5.) Hold down CTRL and Press "W".
6.) Type in "www.server.com" and press return. You'll be taken to the
currect part of the file for that domain.
7.) Find the line "AliasMatch ^/users/([^/]+)(/(.*))?
/home/sites/site3/users/$1/web/$3"
8.) Add the following to a line below it: "AliasMatch
^/usersites/([^/]+)(/(.*))? /home/sites/$1/web/$3"
9.) Hold down CTRL and press "O". Type Y when asked if you want to overwite.
10.) Restart the http server by typing "/etc/rc.d/init.d/httpd stop",
return then "/etc/rc.d/init.d/httpd start" return.
11.) Exit Telnet/SSH.
You now have the ability to access virtual sites prior to updating DNS. I
*know* this will work on a RaQ3, but have not tried it on a RaQ4. But i
presume it will work as i think they use the same directory arrangement for
sites. As long as you back up httpd.conf you shouldn't have to worry if it
doesn't work, you can copy your back up back.
As I say the answer is probably obvious but I can find it on the knowledge
base or in the manual.
Maybe my solution should be added to the KB? I would have thought it was a
pretty common question and so was in the KB.
Anyway, hope this helps.
--
Rocky Hetherington | mailinglists@xxxxxxxxxx
Alaula Limited
WebDesign | http://www.alaula.com
Hosting and Domain registration | http://www.alaula.net