PcPixel Posted July 6, 2007 Share Posted July 6, 2007 I'm trying to restrict folder access based on IP. If I do a blanket Allow or Deny (Deny from all, Allow from all) that works. However, if I try something like: <Directory "D:/MySite/Folder"> AllowOverride None Order Deny,Allow Allow from 192.168.1.1 </Directory> It doesn't work at all. It works as an explicit deny. I also noticed that unless I add the: Win32DisableAcceptEx I don't get any IP addresses logged. I'm using Apache 2.2.4. Quote Link to comment Share on other sites More sharing options...
MemphiS Posted July 6, 2007 Share Posted July 6, 2007 Simple but try: <Directory "D:/MySite/Folder"> AllowOverride None Order Deny,Allow Allow from 192.168.1.1 </Directory> 1 space for deny... Quote Link to comment Share on other sites More sharing options...
PcPixel Posted July 6, 2007 Author Share Posted July 6, 2007 Nope. Didn't work. I can still access the folder from IPs that shouldn't be allowed to. Quote Link to comment Share on other sites More sharing options...
apacheguy Posted July 6, 2007 Share Posted July 6, 2007 Try this: <Directory "D:/MySite/Folder"> AllowOverride None Order Deny,Allow Deny from all Allow from 192.168.1.1 </Directory> If that doesn't work, I would suggest looking at this page: http://httpd.apache.org/docs/1.3/mod/mod_access.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.