Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 2002 10:57:14 +0200
From:      "tonix (Antonio Nati)" <tonix@interazioni.it>
To:        Jeff Jirsa <jeff@unixconsults.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: FreeBSD and regex and Apache
Message-ID:  <5.1.1.6.0.20020828105118.00abcbe8@pop.ufficiopostale.it>
In-Reply-To: <20020827171517.S5930-100000@boris.st.hmc.edu>
References:  <5.1.1.6.0.20020828015806.00a897c8@pop.ufficiopostale.it>

next in thread | previous in thread | raw e-mail | index | archive | help
I've found the problem.

No regex, no FreeBSD, my (!) configuration error.

I made initially

<directory "/">
         <other stuff>
         ................
         order allow,deny
         deny from all
</directory>
<Location "/">
         <other stuff>
         ................
         order deny,allow
         allow from all
</Location>
<Files ~ "^\.ht">
         order allow,deny
         deny from all
</Files>

The error is in configuration, because <Location> are evaluated after all 
<Directory> and <Files> (or <FilesMatch>), so access to .ht* is always granted.

Changing it to:

<directory "/">
         <other stuff>
         ................
</directory>
<Location "/">
         <other stuff>
         ................
</Location>
<Files ~ "^\.ht">
         order allow,deny
         deny from all
</Files>

makes it works.


Thanks,

Tonino


At 27/08/2002 27/08/2002 -0700, Jeff Jirsa wrote:
>On Wed, 28 Aug 2002, tonix (Antonio Nati) wrote:
>
> > I've a problem with Apache 1.3.26 on FreeBSD 4.0 (I've looked in apache
> > lists, with no result up to now).
> >
> > <Files> and <FilesMatch> directives, that work on Linux, do not work on
> > FreeBSD.
> >
> > <FilesMatch "^\.(.*)>         # or simply <FilesMatch "^\.">
> >       order allow,deny
> >       deny from all
> > </FilesMatch>
> >
> > Is there any regex library hint/problem/difference from standard I 
> should know?
> >
>
><Files> SHOULD work.
>
>I've got a stock 1.3.26 setup from the ports that comes with
>
>
><Files ~ "^\.ht">
>     Order allow,deny
>     Deny from all
></Files>
>
>By default.
>
>
>Hope that helps,
>
>- Jeff
>
>--
>
>Jeff Jirsa
>jeff@unixconsults.com
>
>--


------------------------------------------------------------
         Inter@zioni            Interazioni di Antonio Nati
    http://www.interazioni.it      tonix@interazioni.it
------------------------------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.1.6.0.20020828105118.00abcbe8>