LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-12-2005, 02:21 PM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
httpd.conf <Directory> question


The URL is:
http://192.168.3.200/pir/index.php


In the httpd.conf under the <Directory> section,
how do I configure it such that:

index.php is shows up when the user enters "http://192.168.3.200/pir/"
index.html should not be directly accessed in the "pir" directory
index.php and index.html should not be accessed in any sub-directory under "pir"
 
Old 02-12-2005, 02:45 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Code:
<Directory /path/to/documentroot/pir>
DirectoryIndex index.php
   <Files ./pir/index.html>
   Order deny,allow
   Deny from all
   </Files>
</Directory>

<Directory  /path/to/documentroot/pir/*>
   <Files ./pir/*/index.*>
   Order deny,allow
   Deny from all
   </Files>
</Directory>
I didn't test this so you may have to tweak. This isn't homework is it?
 
Old 02-12-2005, 02:53 PM   #3
lothario
Member
 
Registered: Apr 2004
Posts: 340

Original Poster
Rep: Reputation: 30
Thanks.
Homework, hmm - it has been many years (double digits) since I had homework.
I am just struggling with this.
 
Old 02-12-2005, 03:10 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
He he, sorry. No offense. Your question was just phrased like a homework question
 
  


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
Httpd.conf And Httpd2.conf ???? alejandroye Linux - General 2 11-07-2004 12:23 AM
httpd.conf & ssl.conf kevinm2 Linux - Security 12 08-31-2004 01:25 PM
saving changes to apache2/conf/httpd.conf file Zaius Linux - Newbie 6 01-09-2004 11:45 PM
httpd.conf question automicro Linux - Software 1 08-09-2003 04:55 PM
httpd chokes on ScriptAlias line in Apache httpd.conf lhoff Linux - Software 1 07-14-2003 10:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:15 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