Jump to content

[SOLVED] Authorization in the httpd.conf file


T-Bird

Recommended Posts

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? ???

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.