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

[cobalt-users] CGI executing on second domain for an account



Hello all!

I have a second domain pointing to a subdir of a virtual site. E.g.
www.domain2.com points to www.domain1.com. I have included a second file
into httpd.conf to realize this. Here's an excerpt:

    <VirtualHost ip.number.is.here>
    ServerName www.domain2.com
    ServerAlias domain2.com
    DocumentRoot /home/sites/siteX/web/domain2
    RewriteEngine on
    RewriteCond %{HTTP_HOST}                !^ip.number.is.here(: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-wrapper .cgi
    AddHandler cgi-wrapper .pl
    AddHandler server-parsed .shtml
    AddType    text/html     .shtml
    </VirtualHost>

The second domain (domain2.com) works fine with html sites, but when trying
to execute cgis, it does not work. Imagine the following.

I have a script called "cgitest2.cgi" in the /web/domain2 folder. I try to
get http://www.domain2.com/cgitest2.cgi
but the cgi wrapper always tells me "script not found".

When I call http://www.domain1.com/domain2/cgitest2.cgi it works fine!

Any ideas ?

Manuel