LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
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
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:33 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration