>Number: 2080 >Category: general >Synopsis: Regexes for <Location> don't work right inside <virtualhost> >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Apr 20 08:40:00 PDT 1998 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.2.5 >Environment: SunOS tucows.turboline.be 5.6 Generic sun4u sparc SUNW,Ultra-4 gcc version 2.7.2.3 >Description: Given the following excerpt of a httpd.conf file
<VirtualHost w.z.x.y> DocumentRoot /document/root DirectoryIndex index.html index.htm default.html default.htm /cgi-bin/index.pl ServerName www.somedomain.be ErrorLog logs/wtl_error_log TransferLog logs/wtl_access_log ScriptAlias /cgi-bin /shared/www/cgi-bin <Location ~ "^/$"> order deny,allow allow from all </Location> <Location ~ "^/.+"> order allow,deny allow from a.b.c </Location> </VirtualHost> The idea is to let everyone access "http://www.somedomain.com/" (by executing the /cgi-bin/index.pl script) and let only people with IP adresses a.b.c access the rest of the site. Configured like this (with virtualhost) it doesn't work. When configured without virtualhost this works as expected >How-To-Repeat: If needed I can set up a test site with a few simple pages >Fix: >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ]
