LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 04-24-2009, 12:16 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Rep: Reputation: 51
issue with Securing Apache Doc?


I was following official Red Hat Training material and came across this issue:
[code]
Created a file named .htaccess in www.fastserver.com document root with teh following contents:
Code:
AuthName   "restricted stuff"
AuthType   Basic
AuthUserFile /etc/httpd/conf/www.htpasswd
require    valid-user
~
2. Created a domain passwd file:
htpasswd -mc /etc/httpd/conf/www.fastserver.com/www.htpasswd tux
chgrp apache /etc/httpd/conf/www.htpasswd
chmod g+r /etc/httpd/conf/www.htpasswd

Next Step was setting SELINUX context of the new virtual tree so that SELINUX will permit webserver to access it:

Code:
[root@fastserver.com ~]# chcon -R - reference=/var/www/html /var/www/virtual
chcon: can't apply partial context to unlabeled file /var/www/virtual
Whats this error all about?

Even the htmlview http://www.fastserver.com doesnt work!!!
If I type http://fastserver.com it displays test page.

On Checking logs it says:
Code:
[Fri Apr 24 09:42:57 2009] [error] [client 10.14.236.95] Directory index forbidden by rule: /var/www/html/

Last edited by your_shadow03; 04-24-2009 at 12:21 AM.
 
Old 04-24-2009, 12:43 AM   #2
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Guys, I provided
Code:
 chcon -R --reference=/var/www/html /var/www/virtual
And it executed successully.
But Opening the page thru http://fastserver.com doesnt ask me for passwd.
Why So?
still error_log shows while accessing thru my windows desktop:
Code:
[Fri Apr 24 10:07:56 2009] [error] [client 10.14.2.254] Directory index forbidden by rule: /var/www/html/

Last edited by your_shadow03; 04-24-2009 at 12:45 AM.
 
Old 04-24-2009, 12:56 AM   #3
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,461
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I resolved the Issue.. Sorry for the wrong steps I followed.
 
  


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
Securing Apache RVR777 Linux - Server 4 03-06-2007 03:57 AM
Securing Apache 2.2.3 Tralce Linux - Security 2 12-04-2006 08:17 AM
Apache and .doc files zoltrix Linux - General 7 12-03-2006 02:30 PM
apache doc root ownership lt_wentoncha Linux - Software 3 06-30-2006 05:54 PM
Securing Apache v2 markus1982 Linux - General 0 01-14-2003 09:03 AM


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