[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Redirect newdomain,com to mydomain.com/newdomain on RAQ3 ? Will PAY
- Subject: Re: [cobalt-users] Redirect newdomain,com to mydomain.com/newdomain on RAQ3 ? Will PAY
- From: Roger Harrison <cobalt@xxxxxxxxxxxxxxx>
- Date: Tue Oct 31 17:46:10 2000
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Tue, 31 Oct 2000, Steve Bassi wrote:
> On my RAQ 3 I have 1 IP address.
> my domain is fwsshop.com
> I have a domain moorsoft.com whose pages will be stored in
> fwsshop.com/moorsoft
> I do not want to set up a new virtual host
> But I need anyone browsing for moorsoft.com to reach fwsshop.com/moorsoft
OK, this is the way that I do it.
First of all, rather than mapping moorsoft.com to fwsshop.com/moorsoft I
would create a user for fwsshop.com called moorsoft (or something similar,
can be whatever username you like). I would then map the domain to the
/users/moorsoft/web directory under fwsshop. Doing it this way makes it
easy to deal with email for moorsoft.com. If you are not concerned with
that then just go ahead and do it to fwsshop.com/moorsfoft.
First telnet/SSH in to your Raq as root.
Then create an include file for httpd.conf:
touch /etc/httpd/conf/include.conf
Then back up your httpd.conf file:
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.backup
Then open httpd.conf for editing:
pico -w /etc/httpd/conf/httpd.conf
Where you have something like:
NameVirtualHost xxx.xxx.xxx.xxx
<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.fwsshop.com
.....
</VirtualHost>
add the following line before the NameVirtualHost bit:
Include /etc/httpd/conf/include.conf
so it now reads:
Include /etc/httpd/conf/include.conf
NameVirtualHost xxx.xxx.xxx.xxx
<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.fwsshop.com
.....
</VirtualHost>
At this point it's a good idea to restart httpd just to make sure that
the server is happy with the changes to the httpd.conf file:
/etc/rc.d/init.d/httpd restart
Assuming you don't get any errors with restarting, open include.conf
for editing:
pico -w /etc/httpd/conf/include.conf
Then make an entry for fwsshop.com as follows:
<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.moorsoft.com
ServerAdmin admin
DocumentRoot /home/sites/sitex/users/moorsoft/web
ServerAlias moorsoft.com
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
# Uncomment next 2 lines if you want to use SSI
#AddHandler server-parsed .shtml
#AddType text/html .shtml
</VirtualHost>
Then exit and save the file.
Obviously you might have to modify this if you didn't set up moorsoft as a
user. The sitex bit is the site number of fwsshop.com
Then restart httpd:
/etc/rc.d/init.d/httpd restart
Obviously you will need to set up A records for moorsoft.com and
www.moorsoft.com.
If you want all email for moorsoft.com to go to the moorsoft user see:
http://list.cobalt.com/pipermail/cobalt-users/2000-September/021152.html
One bonus of doing it with a user called moorsoft is that moorsoft can use
separate FTP to log in to upload files and can also go to
http://www.fwsshop.com/personal/ and enter his user name and password to
get to the Personal Profile. So he can act as an independent site, but is
not taking up one of the virtual sites in your main GUI.
Hope that helps.
Roger Harrison
PS I hope I haven't made any glaring errors with the above, but as it is
1.30am here and I still haven't fully recovered from being up most of
Sunday night trying to prevent my parents' house from flooding, I can't
guarantee it....