LinuxQuestions.org
Help answer threads with 0 replies.
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 03-24-2011, 03:00 AM   #1
gerry.nachman
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
what is the difference of this apache option


What is the difference? I am assuming if there is no + or - symbol then the default is that the option is activated by apache. Adding + is explicit and is only done when there is a mix of - . Am I right so far?

For example #1 and #2 below mean the same.
1)
<Directory /home/user/public_html>
Options Indexes FollowSymLinks
</Directory>

2)
<Directory /home/user/public_html>
Options +Indexes +FollowSymLinks
</Directory>

#3 becomes invalid, #4 is the correct one
3)
<Directory /home/user/public_html>
Options -Indexes FollowSymLinks
</Directory>

4)
<Directory /home/user/public_html>
Options -Indexes +FollowSymLinks
</Directory>

TIA!

p.s. I tried to search but I can't explain how to say +/- to Google. It gave me unrelated results.
 
Old 03-24-2011, 04:03 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Hi

Have a look at the apache documentation about the Options directive

Regards
 
Old 03-24-2011, 04:30 AM   #3
gerry.nachman
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Thank you. I have already read that before I posted here. It is not clear to me. Documentations have a tendency to be not specific. I can only assume on what it's saying.

Say for example this one.

Quote:
<Directory /web/docs>
Options Indexes FollowSymLinks
</Directory>

<Directory /web/docs/spec>
Options +Includes -Indexes
</Directory>

then the options FollowSymLinks and Includes are set for the /web/docs/spec directory.

The options are set for /web/docs? YES?
and while specs/ is inside of /web/docs it will inherit the parent folder's set options except where the options do not have an explicit +/- as the example shows, the reason why Indexes will not be set only for specs/ dir? YES?

So going back to my other question in the original post, #1 and #2 are the same. YES?
 
Old 03-24-2011, 04:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
and while specs/ is inside of /web/docs it will inherit the parent folder's set options except where the options do not have an explicit +/- as the example shows, the reason why Indexes will not be set only for specs/ dir? YES?
Yup


Quote:
So going back to my other question in the original post, #1 and #2 are the same. YES?
Not absolutely. If you have
Code:
<Directory /home/user>
Options Includes
</Directory>
then for <Directory /home/user/public_html> the #1 your Options become "Indexes FollowSymLinks", while for #2 it's "Includes Indexes FollowSymLinks"
 
Old 03-24-2011, 07:01 AM   #5
gerry.nachman
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Ok thanks. I think I understand it now. How about overriding the previous setting, can it be done?

<Directory /web/docs>
Options Indexes FollowSymLinks
</Directory>

<Directory /web/docs/spec>
Options +Includes -Indexes
</Directory>
## At this point spec/ has the ff. options set Includes and FollowSymLinks ##

<Directory /web/docs/spec/FOO_11>
Options +Indexes
</Directory>

## directory FOO_11 will now have Indexes enabled? ##
 
Old 03-24-2011, 08:07 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,215
Blog Entries: 1

Rep: Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067Reputation: 2067
Quote:
## directory FOO_11 will now have Indexes enabled? ##
Yes it will. It will add Indexes to whatever other Options are inherited from the parent directories
 
  


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
difference between the apache 1.x and 2.x kbarani Linux - General 1 10-11-2009 07:59 AM
the difference of kernel config option among different kernel version? rike_lin Linux - General 3 10-17-2008 08:17 PM
Apache configure option crash_override_me Linux - Software 6 06-20-2008 01:18 PM
Difference Between Apache 2.0 & 2.2 chnlinux Linux - Newbie 1 12-14-2007 10:04 AM
Apache, what is the difference ZC1 Linux - General 1 05-17-2006 11:34 AM

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

All times are GMT -5. The time now is 04:56 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
Open Source Consulting | Domain Registration