[ic] virtual hosts

John Allman interchange-users@icdevgroup.org
Wed Sep 18 13:43:01 2002


Blair Campbell wrote:

>I have virtual hosts running on my apache server on RedHat 7.2. I have tried
>my document root as /var/www/cgi-bin/sam with index.html as the directory
>page. When I go to my url the site does not come up. My other virtual hosts
>work for static pages. I have tried other configurations with no results.
>Any ideas?
>
>O ya the site does come up with the below typed in.
>www.drinkandshrinknow.com/cgi-bin/sam/index.html
>www.drinkandshrinknow.com/cgi-bin/sam/admin/index.html
>I restart apache after I make changes to the virtual hosts.
>
>I don't see how I can set my root for virtual servers without the /var/www/
>
>here is my file setup
>Moving link program to /var/www/cgi-bin/sam.................done.
>Copying share/ files to /var/www/html.......................done.
>Moving HTML files to /var/www/html/sam......................done.
>Moving image files to /var/www/html/sam/images..............done.
>
apache. ok. in your httpd.conf you'll have something like

<VirtualHost some.thing.or.other>
    ServerAdmin blairacampbell@shaw.ca
    DocumentRoot /var/www/html
    Servername your.web.site
    ...
    bunch of stuff
    ...
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    <Directory /var/www/html>
    DirectoryIndex /cgi-bin/sam/index.html
    ...
    more stuff
    ...
    </Directory>

</VirtualHost>

Make it look like that (obviously the some.thing.or.other and so on bits 
need to be replaced and so on), restart apache and this should do what 
you want if i understand you correctly.

John