Received: (qmail 89605 invoked by uid 501); 20 Nov 2001 04:16:28 -0000 Message-Id: <20011120041628.89604.qmail@apache.org> Date: 20 Nov 2001 04:16:28 -0000 From: Scott Ellentuch Reply-To: tuc@ttsg.com To: submit@bugz.apache.org Subject: Unsure example from Guide is working as implemented X-Send-Pr-Version: 3.110 >Number: 8808 >Category: mod_rewrite >Synopsis: Unsure example from Guide is working as implemented >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Nov 19 20:20:00 PST 2001 >Closed-Date: >Last-Modified: Tue Nov 20 18:50:00 PST 2001 >Originator: tuc@ttsg.com >Release: 1.3.22 >Organization: apache >Environment: BSD/OS 3.1, fully patched. gcc 2.7.2.1 >Description: According to documentation, RewriteMap is not allowed in .htaccess. So, I thought that I can just put into httpd.conf as : ServerAdmin webmaster@ttsg.com DocumentRoot /path/sub.domain.com Servername sub.domain.com ErrorLog "|/usr/local/bin/cronolog /usr/local/logs/%Y%m%d/sub-error_log" TransferLog "|/usr/local/bin/cronolog /usr/local/logs/%Y%m%d/sub-access_log" UserDir disabled HostNameLookups off IdentityCheck off ScriptAlias /lcgi-bin/ /path/sub.domain.com/lcgi-bin/ Action cgi-wrapper /cgi-bin/cgiwrap/user SetHandler cgi-wrapper RewriteLogLevel 9 RewriteLog "|/usr/local/bin/cronolog /usr/local/logs/%Y%m%d/sub-rewrite _log" RewriteMap hosts-deny txt:/path/sub.domain.com/lcgi-bin/deny Then, I tried to put the rest in an .htaccess in the /path/sub.domain.com directory : RewriteEngine on RewriteCond ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR] RewriteCond ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND RewriteRule ^/lcgi-bin/denied.cgi - [F] and the content of /path/sub.domain.com/lcgi-bin/deny : A.A.A.A - B.B.B.B - C.C.C.C - Running as is, I get no input anywhere when attempting from A.A.A.A to http://sub.domain.com/lcgi-bin/denied.cgi I figured if I put "RewriteEngine on" in the httpd.conf it might help. At that point, the server only returns immediately without ANYTHING. The reason I'm putting ONLY the RewriteMap into the httpd.conf is so that I can be very flexible in the .htaccess usage. Its confusing to have some .htaccess things in directories, and some in httpd.conf This is almost 100% to the Guide. Am I doing something wrong, unexpected, or stupid? >How-To-Repeat: See above. >Fix: >Release-Note: >Audit-Trail: From: Tuc To: submit@bugz.apache.org Cc: tuc@ttsg.com Subject: Re: mod_rewrite/8808: Unsure example from Guide is working as implemented Date: Mon, 19 Nov 2001 23:20:54 -0500 (EST) Forgot to include : [Mon Nov 19 23:03:49 2001] [error] [client 207.99.6.160] (45)Operation not suppo rted: mod_rewrite: failed to lock file descriptor [Mon Nov 19 23:04:43 2001] [error] [client 207.99.6.160] (45)Operation not suppo rted: mod_rewrite: failed to lock file descriptor [Mon Nov 19 23:04:47 2001] [error] [client 207.99.6.160] (45)Operation not suppo rted: mod_rewrite: failed to lock file descriptor [Mon Nov 19 23:18:21 2001] [error] [client 207.99.6.160] (45)Operation not suppo rted: mod_rewrite: failed to lock file descriptor From: Tuc To: submit@bugz.apache.org Cc: apache-bugdb@apache.org, apbugs@apache.org Subject: Re: mod_rewrite/8808: Unsure example from Guide is working as implemented Date: Tue, 20 Nov 2001 21:40:38 -0500 (EST) Hi, Found the issue. Please change this to an enhancement request. Please allow pipes in "RewriteLog". Tuc/TTSG Internet Services, Inc. From: Tuc To: submit@bugz.apache.org Cc: apache-bugdb@apache.org, apbugs@apache.org Subject: Re: mod_rewrite/8808: Unsure example from Guide is working as implemented Date: Tue, 20 Nov 2001 21:40:38 -0500 (EST) Hi, Found the issue. Please change this to an enhancement request. Please allow pipes in "RewriteLog". Tuc/TTSG Internet Services, Inc. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include 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! ]