cgi-bin not visible to apache with virtualhosts

From: Ohmster (donteven_at_thinkaboutit.com)
Date: 05/31/04


Date: Sun, 30 May 2004 22:08:10 GMT

I also posted this to the alt.apache.configuration newsgroup but so far, no
answers. I wanted to post this question here because you networking dudes are
really smart and could probably help quite a bit with this.

I recently purchased a domain for my family and have added the DNS from
zoneedit.com. I setup my httpd.conf file to add the virtual domain as such:

<VirtualHost *>
    ServerAdmin paul@joe.com
    DocumentRoot /home/joe/public_html/family
    ServerName www.myfamily.org
    ServerAlias myfamily.org *.myfamily.org
    ErrorLog /home/joe/public_html/family/logs/host.myorg.error.log
    CustomLog /home/joe/public_html/family/logs/host.myorg.org-access_log
common
    Options ExecCGI
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
</VirtualHost>

<VirtualHost *>
    ServerAdmin paul@joe.com
    DocumentRoot /var/www/html
    ServerName www.joe.com
    ServerAlias joe.com *.joe.com
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

The first virtual host is the new one. The second one is the existing root
server. I have not setup the cgi stuff for the main or user dir servers
because I am trying to get this all to work now on the virtual host.
Everything worked before adding the virtual host. This works now but a
strange thing has happend. The cgi-bin directory
for the first virtual host, myfamily.org, even though it is there where it
should be, cannot be seen by apache, as in...

http://www.myfamily.org/cgi-bin/pathtest.cgi
Error 404 not found

But if I do this:
http://www.myfamily.org/~joe/cgi-bin/pathtest.cgi
it all works. WTF?!

I have user dirs enabled and have used them for several years with cgi
enabled. How come my cgi-bin directory is not visible to my virtual host?
This does not make sense. Somebody help me, please!

I want this to work normally and not have to use a /~joe/ to use cgi on this
server.

-- 
Of course my email address is invalid.
Email me by assembling this address:
tinykitty /a/t/ ohmster dot com
~Ohmster


Relevant Pages

  • Re: problems with setup apache and virtual hosts file
    ... On 4/28/06, Trevor Tregoweth wrote: ... I am trying to set up apache with virtual host, have created 2 files, with ... ServerAdmin webmaster@localhost ... Did you restart apache? ...
    (Ubuntu)
  • Re: Apache Virtual Server
    ... >I tried to setup two virtual servers in our LAN. ... > ServerAdmin ... ... > CustomLog ... ... >virtual host, ...
    (alt.os.linux.suse)
  • Re: Ruby and Rail
    ... <IfModule mod_fastcgi.c> ... 2- I defined a virtual host (and not forgotten to write also in NetInfo utility -> machines) ... ServerAdmin myname@xxxxxxx ...
    (comp.lang.ruby)
  • problems with setup apache and virtual hosts file
    ... I am trying to set up apache with virtual host, have created 2 files, ... with the following config, i would really appreciate some help in ... ServerAdmin webmaster@localhost ...
    (Ubuntu)
  • Re: cgi
    ... > Maybe the problem was that in the default httpd.conf the AddHandler ... > My CGI directory define and the AddHandler ... - if you are using a Virtual Host - you will need to identify ...
    (comp.lang.tcl)