[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] 2 domains one website
- Subject: Re: [cobalt-users] 2 domains one website
- From: "[ AVANT INTERNET ] Silvester v.d. Leer" <cobaltusers@xxxxxxxxx>
- Date: Sat Jan 20 01:30:00 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
To use 2 sites on one domain do the following :
point the dns to the ip adres of the original site, but, if you have more
then one virtual site on one IP adres, it will point to the first site on
that IP adres, to fix this you have to edit /etc/httpd/conf/httpd.conf, now
do not copy the virtualsite and place it at the bottom, because the GUI will
remove this entry, instead of that put
Include /etc/httpd/conf/extra.conf
In the file /etc/httpd/conf/extra.conf you put the following :
<VirtualHost 213.222.24.45> <--- the ip adres of the original site
ServerName www.abc.nl <--- the name of the 2nd site
ServerAdmin admin
DocumentRoot /home/sites/www.bbb.nl/web <--- the directory of the 1st site
ServerAlias abc.nl <--- the alias for the 2nd site
RewriteEngine on
RewriteCond %{HTTP_HOST} !^213.222.24.45(:80)?$ <---- the ip
adres of the original site
RewriteCond %{HTTP_HOST} !^www.abc.nl(:80)?$ <-- the
sitename of the 2nd site
RewriteRule ^/(.*) http://www.abc.nl/$1 [L,R]
<---the sitename of the 2nd site
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))?
/home/sites/www.bbb.nl/users/$1/web/$3 <--- the direcory of the 1st site
AliasMatch ^/users/([^/]+)(/(.*))?
/home/sites/www.bbb.nl.nl/users/$1/web$ <---- the directory of the 1st site
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
</VirtualHost>
to catch all email from the 2st domain to be send to the first domain do
make the following script :
#!/bin/bash
echo Add Mail user to sendmail
OPTIONS="Add Restart Quit"
select opt in $OPTIONS; do
if [ "$opt" = "Quit" ]; then
echo done
exit
elif [ "$opt" = "Add" ]; then
echo Please, enter domain name
read DOMAIN
echo Please, enter mail box name
read MAILBOX
echo "Domain Name $DOMAIN"
echo "Mail Box Name $MAILBOX"
echo "Ok y n"
read OK
if [ "$OK" = "y" ]; then
SENDM=`grep $DOMAIN /etc/sendmail.cw -c`VIRTM=`grep $DOMAIN
/etc/virtusertable -c`
#VSDTM=`grep $MAILBOX /etc/virtusertable -c`
VSM=$[$SENDM+$VIRTM]
if [ "$VSM" = "0" ]; then
cp /etc/sendmail.cw /etc/sendmail.cw.old
cp /etc/virtusertable /etc/virtusertable.old
echo $DOMAIN >> /etc/sendmail.cw
echo @$DOMAIN $MAILBOX >>
/etc/virtusertable
echo Mail User Added
else
clear
echo Not added Exists
fi
else
clear
echo Not added
fi
elif [ "$opt" = "Restart" ]; then
makemap hash /etc/virtusertable < /etc/virtusertable
/etc/rc.d/init.d/sendmail restart
echo Virtuser table added
echo Sendmail restarted
else
clear
echo bad option
fi
done
using this script wil install the domainnames in the sendmail config.
for example email from abc.com to bbb.com
email boxname : %1@xxxxxxx
domain : abc.com
hope this helped
Silvester
Avant Internet
> On Fri, 19 January 2001, "andreas \(@work\)" wrote:
> Use DNS to point to the same IP as the root virtual host.
>
> >
> > hi list,
> >
> > if youve got 2 or more domains ( for example aaa.com and bbb.com )
> >
> > do you add them both in the systemadmin panel
> >
> > or just one of them
> >
> > and edit the httpd.conf ?
> >
> >
> > whats the best solution
> >
> > we are worried about the 200 domains limit on the raq
> > cause most of our costumers have 2 or more domains
> > just pointing to the same website
> >
> >
> > than you
> >
> > andreas
> >
> > _______________________________________________
> > cobalt-users mailing list
> > cobalt-users@xxxxxxxxxxxxxxx
> > To Subscribe or Unsubscribe, please go to:
> > http://list.cobalt.com/mailman/listinfo/cobalt-users
>
> Brook Lowry
> Landscape Analysis Laboratory
> University of the South
> Sewanee, Tennessee
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>