You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "tonix (Antonio Nati)" <to...@interazioni.it> on 2002/08/27 01:11:33 UTC
[users@httpd] FilesMatch problems
I want that none may access files starting with dot, like ".index.html".
So, I'm using this directive unside my <virtual> section, but it does not work.
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
I tried all variants, but it does not work (even "\.index\.html" does not work.
What should I do? Any hint?
Apache is 1.3.26.
Tonino
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by "tonix (Antonio Nati)" <to...@interazioni.it>.
Jacob,
I've added
"--enable-rule=WANTHSREGEX=yes" \
to configure's options, in order to enable the regex library included with
Apache (instead of the FreeBSD one), but the result is always the same.
What else to look for? (On Linux it works!)
Tonino
At 27/08/2002 27/08/2002 -0400, you wrote:
> > I did try it on a Linux box, and it works.
> >
> > On my FreeBSD it does not want to work. Could it be a "regex" difference
>on
> > FreeBSD?
>
>Sure sounds that way. Anybody know if the regex parser in Apache depends on
>any system libraries or utilities? Might be a bug if not :)
>
>-Jacob
>http://www.listingbook.com
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
------------------------------------------------------------
Inter@zioni Interazioni di Antonio Nati
http://www.interazioni.it tonix@interazioni.it
------------------------------------------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by Jacob Coby <jc...@listingbook.com>.
> I did try it on a Linux box, and it works.
>
> On my FreeBSD it does not want to work. Could it be a "regex" difference
on
> FreeBSD?
Sure sounds that way. Anybody know if the regex parser in Apache depends on
any system libraries or utilities? Might be a bug if not :)
-Jacob
http://www.listingbook.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by "tonix (Antonio Nati)" <to...@interazioni.it>.
I did try it on a Linux box, and it works.
On my FreeBSD it does not want to work. Could it be a "regex" difference on
FreeBSD?
Tonino
At 27/08/2002 27/08/2002 -0400, you wrote:
> > same result, it does not work.
> >
> > Does it work on your system?
>
>It works, but I haven't tried it in your situation. I use a similar
>directive to block .htaccess and *.lib files.
>
> > I can do it with a rewrite directive, but I want to understand why it does
> > not work with <files> and <filesmatch>.
>
>Have you tried running apachectl configtest? Any messages in the log files?
>Tried matching something explicitly (like ".htaccess")? Maybe something
>needs to be enable before the Files and FilesMatch directives work?
>
>-Jacob
>http://www.listingbook.com
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
------------------------------------------------------------
Inter@zioni Interazioni di Antonio Nati
http://www.interazioni.it tonix@interazioni.it
------------------------------------------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by Jacob Coby <jc...@listingbook.com>.
> same result, it does not work.
>
> Does it work on your system?
It works, but I haven't tried it in your situation. I use a similar
directive to block .htaccess and *.lib files.
> I can do it with a rewrite directive, but I want to understand why it does
> not work with <files> and <filesmatch>.
Have you tried running apachectl configtest? Any messages in the log files?
Tried matching something explicitly (like ".htaccess")? Maybe something
needs to be enable before the Files and FilesMatch directives work?
-Jacob
http://www.listingbook.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by "tonix (Antonio Nati)" <to...@interazioni.it>.
Jacob
same result, it does not work.
Does it work on your system?
I can do it with a rewrite directive, but I want to understand why it does
not work with <files> and <filesmatch>.
This works:
RewriteEngine on
RewriteLogLevel 0
RewriteRule /\..* /notfound.html
Thanks,
Tonino
At 26/08/2002 26/08/2002 -0400, you wrote:
> > It does not work.
> >
> > I've tried also
> >
> > <FilesMatch "/\.(.*)">
> > order allow,deny
> > Deny from all
> > </FilesMatch>
>
>Try:
>
><Files ~ "^\.(.*)">
> Order allow,deny
> Deny from all
></Files>
>
>-Jacob
>http://www.listingbook.com
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
------------------------------------------------------------
Inter@zioni Interazioni di Antonio Nati
http://www.interazioni.it tonix@interazioni.it
------------------------------------------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by Jacob Coby <jc...@listingbook.com>.
> It does not work.
>
> I've tried also
>
> <FilesMatch "/\.(.*)">
> order allow,deny
> Deny from all
> </FilesMatch>
Try:
<Files ~ "^\.(.*)">
Order allow,deny
Deny from all
</Files>
-Jacob
http://www.listingbook.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by "tonix (Antonio Nati)" <to...@interazioni.it>.
It does not work.
I've tried also
<FilesMatch "/\.(.*)">
order allow,deny
Deny from all
</FilesMatch>
with no results.
Tonino
At 26/08/2002 26/08/2002 -0400, Jacob Coby wrote:
>I think you need a (.*) after the "\." The regexp you have now only matches
>".", not ".something".
>
> > I want that none may access files starting with dot, like ".index.html".
> >
> > So, I'm using this directive unside my <virtual> section, but it does not
>work.
> >
> > <FilesMatch "^\.">
> > Order allow,deny
> > Deny from all
> > </FilesMatch>
> >
> > I tried all variants, but it does not work (even "\.index\.html" does not
>work.
> >
> > What should I do? Any hint?
> >
> > Apache is 1.3.26.
> >
> > Tonino
> >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > " from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
------------------------------------------------------------
Inter@zioni Interazioni di Antonio Nati
http://www.interazioni.it tonix@interazioni.it
------------------------------------------------------------
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] FilesMatch problems
Posted by Jacob Coby <jc...@listingbook.com>.
I think you need a (.*) after the "\." The regexp you have now only matches
".", not ".something".
> I want that none may access files starting with dot, like ".index.html".
>
> So, I'm using this directive unside my <virtual> section, but it does not
work.
>
> <FilesMatch "^\.">
> Order allow,deny
> Deny from all
> </FilesMatch>
>
> I tried all variants, but it does not work (even "\.index\.html" does not
work.
>
> What should I do? Any hint?
>
> Apache is 1.3.26.
>
> Tonino
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org