[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] 2nd domain on same web dir



----- Original Message -----
From: "manitu" <manitu@xxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Friday, March 10, 2000 10:34 AM
Subject: Re: [cobalt-users] 2nd domain on same web dir


> > Now the costumer can access the domain using subdomain.ourdomainname.com
.
> > It works perfect...well, almost perfect. Because when I try to run
> > CGI-scripts or use SSI, they don't work!
> >
> > Does anybody know how to solve this problem?
>
> Yes! No Problem. Add the following directives to the new virtual host:
>
>     RewriteEngine on
>     RewriteCond %{HTTP_HOST}                !^IP.NU.MB.ER(:80)?$
>     RewriteCond %{HTTP_HOST}                !^www.domain2.com(:80)?$
>     RewriteRule ^/(.*)                      http://www.domain2.com/$1
[L,R]
>     RewriteOptions inherit
>     AliasMatch ^/~([^/]+)(/(.*))? /home/sites/siteX/users/$1/web/$3
>     AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/siteX/users/$1/web/$3
>     AddHandler cgi-script .cgi
>     AddHandler cgi-script .pl
>     AddHandler server-parsed .shtml
>     AddType    text/html     .shtml
>
> Please note the following. While using "cgi-script" the program "CGI Wrap"
> which ensures some security on the RaQ is not active. CGI scripts are
> executed classically (see previous postings in this list). Using
"cgi-wrap"
> instead of "cgi-script" does *NOT* work due to a compilation "error" (I
> think it is intended but..) in the cgi wrapper.

Hmm... But I cannot get them to work now. I added the following to
codomains.conf :

<VirtualHost IP.NU.MB.ER>
ServerName subdomain.domain.com
DocumentRoot /home/sites/site10/web
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^IP.NU.MB.ER(:80)?$
RewriteCond %{HTTP_HOST}                !^subdomain.domain.com(:80)?$
RewriteRule ^/(.*)                      http://subdomain.domain.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/siteX/users/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/siteX/users/$1/web/$3
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
AddHandler server-parsed .shtml
AddType    text/html     .shtml
</VirtualHost>


After adding this I reloaded the webserver. What did I do wrong?

Thanks again :)

Regards,
Hans