Link to home
Start Free TrialLog in
Avatar of t42ucsdedu
t42ucsdedu

asked on

virtual hosting out of cgi-bin

hi,

i have registered the "bob.mycompany.ucla.edu" as an alias of mycompany.ucla.edu.  And i would like it to point "bob.mycompany.ucla.edu to /web/cgi-bin/bob/ on my server.

<VirtualHost *:80>
        ServerName bob.mycompany.ucla.edu
        ServerAlias bob.mycompany
        ScriptAlias /cgi-bin/ "/web/cgi-bin/bob/"
        DocumentRoot /web/cgi-bin/bob/
        ErrorLog logs/error_log.bob.mycompany
        CustomLog logs/access_log.bob.mycompany common
</VirtualHost>

when i point my browser to http://bob.mycompany.ucla.edu, it just goes to mycompany.ucla.edu and not to the /web/cgi-bin/bob/.

thanks for your help,

K

 
SOLUTION
Avatar of rama_krishna580
rama_krishna580
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of t42ucsdedu
t42ucsdedu

ASKER

there must be a way to do it without rewrite rules--and without getting zope involved in this case.  I also have zope on the server, so this info will be useful later on for sure.

K
RewriteEngine On
 RewriteCond %{REQUEST_URI} ^[/]*$
 RewriteRule ^(.*) /cgi-bin/your.cgi [L]
<VirtualHost *:80>
        ServerName bob.mycompany.ucla.edu
        ServerAlias bob.mycompany
        ScriptAlias /cgi-bin/ "/web/cgi-bin/bob/"
        DocumentRoot /web/cgi-bin/bob/
       RewriteEngine On
       RewriteCond %{REQUEST_URI} ^[/]*$
       RewriteRule ^(.*) /cgi-bin/bob/index.cgi [L]
       ErrorLog logs/error_log.bob.mycompany
        CustomLog logs/access_log.bob.mycompany common
</VirtualHost>


I tried this but did not work,

K
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial