LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-06-2010, 05:14 PM   #1
IwantLINUX
Member
 
Registered: Oct 2004
Location: India
Distribution: RH9,Fedora
Posts: 75

Rep: Reputation: 15
Apache Help!


Hi All,

I am testing Apache and getting confused a bit. I have created a softlink under /var/www/html/pam pointing to PAM DOCS.

lrwxrwxrwx 1 root root 29 Feb 7 05:58 pam -> /usr/share/doc/pam-0.77/html/

Now what i am trying to do is stop access to /usr/share/doc/pam-0.77/html/ when someone put domain.com/pam in browser. I added the following to httpd.conf :

<Directory "/usr/share/doc/pam-0.77/html">
Order allow,deny
Deny from all
</Directory>

However, its not making any difference. We are still able to browse the original directory.

How can i stop a softlink to access a directory?

Regards,
 
Old 02-06-2010, 06:01 PM   #2
JimBrewster
Member
 
Registered: Feb 2010
Location: usa:/dev/random
Distribution: Slackware, Salix
Posts: 237

Rep: Reputation: 59
I'm guessing that Apache treats the symlink independently from the original path, so replace:
Code:
<Directory "/usr/share/doc/pam-0.77/html">
Order allow,deny
Deny from all
</Directory>
with:
Code:
<Directory "/var/www/html/pam">
Order allow,deny
Deny from all
</Directory>
Either that or you need to restart the http daemon.
HTH
 
Old 02-06-2010, 06:02 PM   #3
spiderbatdad
Member
 
Registered: Nov 2009
Location: mote of dust suspended in a sunbeam
Distribution: Arch Linux / Ubuntu 10.10
Posts: 40

Rep: Reputation: 17
http://httpd.apache.org/docs/1.3/mod...ess.html#allow
See also Deny and environment variables

Example:

SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
<Directory /docroot>
Order Deny,Allow
Deny from all
Allow from env=let_me_in
</Directory>
 
Old 02-06-2010, 06:04 PM   #4
spiderbatdad
Member
 
Registered: Nov 2009
Location: mote of dust suspended in a sunbeam
Distribution: Arch Linux / Ubuntu 10.10
Posts: 40

Rep: Reputation: 17
mmm. double posted.

Last edited by spiderbatdad; 02-06-2010 at 06:05 PM.
 
Old 02-07-2010, 01:05 AM   #5
IwantLINUX
Member
 
Registered: Oct 2004
Location: India
Distribution: RH9,Fedora
Posts: 75

Original Poster
Rep: Reputation: 15
Thank you all for the help!!!
 
  


Reply

Tags
access, apache, deny


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
setting up apache from scratch on a linux machine, apache failed message upon bootup dramous43 Linux - Enterprise 2 01-26-2010 07:53 AM
Apache Webserver on Slackware - Failed to Start Apache - 'no listening sockets .." CCTVGuru Linux - Server 4 10-11-2009 01:14 AM
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM


All times are GMT -5. The time now is 12:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration