Forum Moderators: phranque

Message Too Old, No Replies

When restricting access with the .HTCCESS file

Help

         

Prohibited

12:16 am on Dec 28, 2004 (gmt 0)

10+ Year Member



How would I fix my server so it bans IPS SERVER wide. At the moment it's just banning from the htdocs and not the cgi-bin. How can I make it ban from both? I also tried putting an .htaccess in thr CGI-BIN directory, nothing happend. It ONLY restricts access the the htdocs, not cgi-bin. :(

Thanks

Here's what I currently have in my .HTACCESS file:

order allow,deny
allow from all
deny from ***.**.***.***
deny from ***.**.***.***

The * are really ips, but it's someones privacy not to show.

Prohibited

3:32 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



Anyone that can help me out here?

jdMorgan

5:42 pm on Dec 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Depends on whether you have access to the server configuration or not...

Shared cgi-bin directories are typically "Aliased" (See Apache mod_alias) on commercial hosting accounts, so your .htaccess file will not be executed when requests are made to that directory. This is because the directory is not where it appears to be located in your directory structure, but rather is located in a more secure area of the server.

If you do not have access to httpd.conf, you may need to copy the files you need from the cgi-bin directory into a directory that you "own" and then take steps to secure them there.

Jim

Prohibited

11:47 pm on Dec 29, 2004 (gmt 0)

10+ Year Member



Yeah I have access to it. And wheres there mod thing? What do I edit?

Prohibited

8:34 pm on Dec 31, 2004 (gmt 0)

10+ Year Member



Can anyone else help?

jdMorgan

8:44 pm on Dec 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just add your code to http.conf, either in the individual <directory> containers or in the <VirtualHost> containers. I assume you've read the relevant Apache documentation [httpd.apache.org] on this, but if not, we can't do your homework for you...

Jim