Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 16th, 2001, 07:39 PM
simovsky simovsky is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 13 simovsky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
directorymatch

I really need help on this one.

I would like to restrict access to various directorys named "paperwork", anything that matches http://127.1/*paperwork*/*.

I supose I should use:

<directorymatch _?_>
order deny,allow
deny from all
</DirectoryMatch>

But I'm a newbie and I can't find out what is the expression I should use where is the _?_.

Can anyone help me?

SOrry for the lousy english.

Best Regards,
Simao Mata
simao@bliter.com

Reply With Quote
  #2  
Old November 17th, 2001, 03:33 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> anything that matches http://127.1/*paperwork*/*

You need to redesign your docroot layout. Matching anythingpaperworkanything is very inefficient.

<DirectoryMatch ".*paperwork.*">

>> order deny,allow
>> deny from all

This doesn't do any good and you are denying access to yourself as well.
Try something like this:

<DirectoryMatch ".*paperwork.*">
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 12.34.56.78 192.168.0.0/24
AuthType Basic
AuthName "Private Paperwork"
AuthUserFile /server/path/to/nondocroot/.htpasswd
Require valid-user
Satisfy any
</DirectoryMatch>

Reply With Quote
  #3  
Old November 17th, 2001, 03:58 PM
simovsky simovsky is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 13 simovsky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It works fine.
Thanks!

Simao Mata
simao@bliter.com

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > directorymatch


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT