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. Link to comment https://forums.phpfreaks.com/topic/58707-allowdeny-not-working-for-folders/ 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... Link to comment https://forums.phpfreaks.com/topic/58707-allowdeny-not-working-for-folders/#findComment-291227 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. Link to comment https://forums.phpfreaks.com/topic/58707-allowdeny-not-working-for-folders/#findComment-291458 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 Link to comment https://forums.phpfreaks.com/topic/58707-allowdeny-not-working-for-folders/#findComment-291475 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.