www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Zelin <...@shore.net>
Subject mod_env/6382: mod_vhost_alias.c's VirtualDocumentRoot directive does not set DOCUMENT_ROOT correctly
Date Mon, 07 Aug 2000 06:38:52 GMT

>Number:         6382
>Category:       mod_env
>Synopsis:       mod_vhost_alias.c's VirtualDocumentRoot directive does not set DOCUMENT_ROOT
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Sun Aug 06 23:40:00 PDT 2000
>Originator:     mtg@shore.net
>Release:        Apache/1.3.9 (Unix)
FreeBSD 3.4-RELEASE FreeBSD 3.4-RELEASE #0: 
Sat Mar 11 06:20:17 EST 2000     
/usr/src/sys/compile/LOCAL  i386
I have multiple IP's on my machine, with one of them
set up with "Bulk Virtual Hosting."

Everything works fine, except that CGI programs called on 
a virtual host under my virtual IP ends up getting a the
name of the first file references in my configuration file
reported as the Document_root instead the correct directory.
(Such as "/usr/local/apache/htdocs", presumably taken from
the '<Directory "/usr/local/apache/htdocs"'>' directive.

This is rather hard to work around for me.  I could use
SCRIPT_FILENAME to locate the root directory, except that
when I use a Script_alias directive, the SCRIPT_FILENAME
is set to the script's directory (as it should) leaving no
obvious way to locate the correct Document_root

Document_root gets set correctly for my other "normal"
virtual hosts on the other IP's.
I suspect that if you set up a machine with multiple IP's and
Virtual Hosst and make only one of them, preferably not the
first one, use the VirtualDocumentRoot directive, that it will
probably do the same thing.

If not, email me and I'll try to document and research
this better.

Here's some extracted coded.  I changed a lot of the
names "to protect the innocent" and I apologise if I
made any typos while doing that.  Hopefully you can
easily find the bug and reproduceit without this 
example though.

<Directory "/usr/local/apache/htdocs">
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Order allow,deny
    Allow from all


        ServerAdmin     mtg@shore.net
        DocumentRoot    /usr/home/fs_d/19/public_html
        ServerName      greatfudge.com
        ErrorLog        /usr/home/fs_d/19/wwwlogs/errors
        CustomLog       /usr/home/fs_d/19/wwwlogs/access combined
        CustomLog       /usr/home/lynxcc/wwwlogs/hosts dzhost

        UseCanonicalName        Off
        VirtualDocumentRoot  /usr/home/%-2.1/%-2.0.%-1.0
        ServerAdmin     v74-webmaster@fudge.com
        ErrorLog        /usr/home/wwwlogs/errors
        CustomLog       /usr/home/wwwlogs/access combined



[HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*]
[SERVER_SOFTWARE=Apache/1.3.9 (Unix)]
It's probably a bug in mod_vhost_alias.c .   If you can't
fix it, let me know.  Perhaps I could track it down myself.
(But I'm working 100+ hrs/wk on other stuff, so it's hard to
get to things quickly.)

 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message