Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


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

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

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

<Directory "/var/www">

Order Allow,Deny

Deny from

Allow from all

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

What am I missing?

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

Rep: Reputation: 113Reputation: 113
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
Posts: 16,260

Rep: Reputation: Disabled
<Directory "/var/www">

Order Allow , Deny

Allow from all

Deny from

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 " )


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 04:51 PM.

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