LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-15-2008, 06:32 PM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
apache2.conf - Deny from ...


In "/etc/apache2/apache2.conf" I just added:


Code:
<Directory "/var/www">

Order Allow,Deny

Deny from 192.168.8.34

Allow from all

</Directory>
Then I re-booted the server.
But I am still able to access the files under /var/www from the 192.168.8.34 client.

What am I missing?

I want to block 192.168.8.34 completely from accessing any page on this web server.
 
Old 09-15-2008, 07:38 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,094
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
You need to switch your order, since you Allow first and Allow allows All, everyone gets in.
Order Deny,Allow
 
Old 09-15-2008, 09:07 PM   #3
John VV
Guru
 
Registered: Aug 2005
Posts: 12,603

Rep: Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677Reputation: 1677
rewright
Code:
<Directory "/var/www">

Order Allow , Deny

Allow from all

Deny from 192.168.8.34

</Directory>
this will work .This is how i block irritating ip's
on the front page of my old web site
( BIG unfriendly letters " Do Not Use A Download Manager -- You Will Be Banned " )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 > "order allow,deny" to allow subdirectories cbonar Linux - Server 13 10-27-2007 03:08 PM
Should I include srm.conf in httpd.conf in apache2? xpucto Linux - Software 3 02-16-2006 08:16 AM
apache2.conf read-only? lPrentice Linux - Newbie 4 05-26-2005 10:06 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM
Squid.conf - how to do customized and stardard access deny message x2000koh Linux - Networking 3 09-04-2002 09:53 PM


All times are GMT -5. The time now is 03:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration