LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-21-2013, 02:41 AM   #1
chicken76
Member
 
Registered: Mar 2009
Distribution: Slackware
Posts: 112

Rep: Reputation: 2
Help me understand Apache access controls


I have the following section in my Slackware 14's default Apache configuration:
Code:
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>
I thought that specifically allowing access in each <Virtualhost *:80> directive (through a <Directory /path> directive) would override that general block, but it doesn't. I can't access any site unless I comment that section out, or I replace it with:
Code:
<Directory />
    AllowOverride all
    Order Deny,Allow
    Allow from all
</Directory>
So what's going on here?
I do like the idea of blocking everything by default and only allowing access to specific folders, but how do I implement it?
With that first section commented out, everything works, but I'm also open to all sort of exploits, right?
 
Old 06-21-2013, 04:53 AM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
AllowOverride directive allow overriding through .htaccess file inside directory. Why you create directory section for directories which need to be allowed

<directory path_of_directory>
Order Deny,Allow
Allow from all
</directory>

OR

<directory path_of_directory>
Require all granted
</directory>

Thanks
 
  


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
LXer: Carla Schroder: Whoever controls technology controls society LXer Syndicated Linux News 0 03-22-2012 09:40 AM
Can't get ALSA's amixer to access controls for a specific device on a card Funkster Linux - Software 0 03-06-2009 04:23 AM
Help with understand Apache Virtual Server kitek Linux - Software 1 06-24-2005 11:28 AM
need help to understand Apache Velocity Hockeyfan Programming 3 05-24-2005 06:22 PM
User and File access controls questions sureshp1980 Linux - General 6 09-26-2003 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:04 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration