httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41867] <DirectoryMatch> Matches Files
Date Wed, 06 Aug 2008 05:00:56 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=41867





--- Comment #4 from imacat <imacat@mail.imacat.idv.tw>  2008-08-05 22:00:54 PST ---
Hi.  This is imacat from Taiwan.  Sorry for the reply delay.  It took me some
time to let 2.3 run.

(In reply to comment #3)
> get the tar ball from http://svn.apache.org/snapshots/httpd/ 

    It does not work, for httpd_20080805161439.tar.gz.  The terminal log is
below.  I used my test case and yours.  Both fails.  Did I fail to load some
module?

    Please tell me if there is any question, or if I could be of any help. 
Thank you.

imacat@rinse ~ % ls -l /tmp/apache/htdocs
total 8
drwxr-xr-x 2 imacat users 4096 Aug  6 12:42 private
-rw-r--r-- 1 imacat users   40 Aug  6 12:34 privatedetective.txt
imacat@rinse ~ % cat /tmp/apache/htdocs/privatedetective.txt
Sherlock Holmes is a private detective.
imacat@rinse ~ % cat /tmp/apache/httpd.conf
DocumentRoot /tmp/apache/htdocs
PidFile /tmp/apache/httpd.pid
LoadModule access_compat_module
/tmp/httpd-2.3/modules/aaa/.libs/mod_access_compat.so
Listen 50080
ErrorLog /tmp/apache/error_log

<DirectoryMatch ^/tmp/apache/htdocs/private>
  Deny from all
</DirectoryMatch>
imacat@rinse ~ % ls -l /tmp/httpd-2.3/CHANGES
-rw-r--r-- 1 imacat users 18371 Aug  5 00:14 /tmp/httpd-2.3/CHANGES
imacat@rinse ~ % /tmp/httpd-2.3/httpd -f /tmp/apache/httpd.conf
imacat@rinse ~ % telnet localhost 50080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /privatedetective.txt HTTP/1.1
Host: localhost
Connection: close

HTTP/1.1 403 Forbidden
Date: Wed, 06 Aug 2008 04:47:44 GMT
Server: Apache/2.3.0-dev (Unix)
Content-Length: 222
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /privatedetective.txt
on this server.</p>
</body></html>
Connection closed by foreign host.
imacat@rinse ~ % kill $(<//tmp/apache/httpd.pid)
imacat@rinse ~ % cat /tmp/apache/error_log
[Wed Aug 06 12:47:35 2008] [notice] Apache/2.3.0-dev (Unix) configured --
resuming normal operations
[Wed Aug 06 12:47:44 2008] [error] [client 127.0.0.1] client denied by server
configuration: /tmp/apache/htdocs/privatedetective.txt
[Wed Aug 06 12:47:49 2008] [notice] caught SIGTERM, shutting down
imacat@rinse ~ %

imacat@rinse apache.18.Jul/install % pwd
/space/store/apache.18.Jul/install
imacat@rinse apache.18.Jul/install % echo "Hello" > ./htdocs/apache_test.txt
imacat@rinse apache.18.Jul/install % cat httpd.conf
DocumentRoot /space/store/apache.18.Jul/install/htdocs
LoadModule access_compat_module
/tmp/httpd-2.3/modules/aaa/.libs/mod_access_compat.so
Listen 8080
PidFile /space/store/apache.18.Jul/install/httpd.pid
ErrorLog /space/store/apache.18.Jul/install/error_log
<DirectoryMatch ^/space/store/apache.18.Jul/install/htdocs/apache>
    deny from all
</DirectoryMatch>
imacat@rinse apache.18.Jul/install % /tmp/httpd-2.3/httpd -f $PWD/httpd.conf
imacat@rinse apache.18.Jul/install % telnet 0 8080
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
GET /apache_test.txt HTTP/1.0

HTTP/1.1 403 Forbidden
Date: Wed, 06 Aug 2008 04:57:30 GMT
Server: Apache/2.3.0-dev (Unix)
Content-Length: 217
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /apache_test.txt
on this server.</p>
</body></html>
Connection closed by foreign host.
imacat@rinse apache.18.Jul/install % kill $(<httpd.pid)
imacat@rinse apache.18.Jul/install % cat error_log
[Wed Aug 06 12:57:19 2008] [notice] Apache/2.3.0-dev (Unix) configured --
resuming normal operations
[Wed Aug 06 12:57:30 2008] [error] [client 127.0.0.1] client denied by server
configuration: /space/store/apache.18.Jul/install/htdocs/apache_test.txt
[Wed Aug 06 12:57:37 2008] [notice] caught SIGTERM, shutting down
imacat@rinse apache.18.Jul/install %


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message