T-Bird Posted March 27, 2009 Share Posted March 27, 2009 For starters the authz_host module is turned on and there are no .htaccess files overwriting my httpd.conf file. This is my first time editing the httpd.conf file, so I'm probably just putting my directive in the wrong place. At any rate in my last topic I learned how to allow only local traffic to a directory, but as I was reading some Apache documention I noted that they recommend actually avoiding .htaccess files and putting authorization directives in the main server configuration file when you have access to them and when the directives wont be changing much. Both of these fit my case. That said, just as a test, I opened httpd.conf and placed the following code at the end of the file <Directory /> Order Deny,Allow Deny from 192.168.1 </Directory> From another computer on the network (IP of 192.168.1.103) I was still able to access all the server's pages. What did I do wrong? Did I put something in the wrong place? Did I miss a step? ??? Quote Link to comment https://forums.phpfreaks.com/topic/151446-solved-authorization-in-the-httpdconf-file/ Share on other sites More sharing options...
corbin Posted March 28, 2009 Share Posted March 28, 2009 Try changing it to 192.168.1. Quote Link to comment https://forums.phpfreaks.com/topic/151446-solved-authorization-in-the-httpdconf-file/#findComment-795635 Share on other sites More sharing options...
T-Bird Posted March 28, 2009 Author Share Posted March 28, 2009 I'll try, and get back to you, but I dont think that's it because I also tried more general things like. Deny from All and that didn't seem to work either. Does it make a difference that I'm using WAMPServer? Quote Link to comment https://forums.phpfreaks.com/topic/151446-solved-authorization-in-the-httpdconf-file/#findComment-795648 Share on other sites More sharing options...
corbin Posted March 28, 2009 Share Posted March 28, 2009 WAMPServer just wraps around Apache and what not, so that shouldn't matter. Would anything else later in the httpd.conf or other included files override that setting? Oh, and you restarted Apache, right? Quote Link to comment https://forums.phpfreaks.com/topic/151446-solved-authorization-in-the-httpdconf-file/#findComment-795649 Share on other sites More sharing options...
T-Bird Posted March 28, 2009 Author Share Posted March 28, 2009 WAMPServer just wraps around Apache and what not, so that shouldn't matter. That's what I thought, but I figured I should throw it out there before anyone went chasing geese. Would anything else later in the httpd.conf or other included files override that setting? I put the code from my first post as the last lines in the httpd.conf file. And I didn't notice any <Location> tags which, if I read correctly, are applied after Directory. I scoured from my root directory up and didn't see any .htaccess files either. Oh, and you restarted Apache, right? Yes. There must be something simple I'm doing wrong... probably a silly typo... but I'm just missing it. Do I have to put that block of code in a specific area? Or can I just append it to the end like I did? Quote Link to comment https://forums.phpfreaks.com/topic/151446-solved-authorization-in-the-httpdconf-file/#findComment-795678 Share on other sites More sharing options...
T-Bird Posted April 4, 2009 Author Share Posted April 4, 2009 Hmmm. I thought using no directory "<Directory />" would do a blanket of the whole server. Apparently not. As soon as I changed the above to <Directory "c:/wamp/www"> it worked perfect. At any rate it works now. Thanks for all the help. Quote Link to comment https://forums.phpfreaks.com/topic/151446-solved-authorization-in-the-httpdconf-file/#findComment-801024 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.