LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-08-2007, 10:53 AM   #1
ThisGuyIKnow
Member
 
Registered: Mar 2006
Posts: 43

Rep: Reputation: 15
Apache 2.2 & Content Switches


Hello people,

I work at a university library and our institution's networks deparment has a lot of "things" in place between our library network and the outside world. One of those "things" being a content switch. So, people in the outside world generally get to our web content via the following url: (not actual hostname, domain & ip, obviously)

Code:
   www.mylibrary.myuniversity.edu = ip 123.123.123.123
The above url/ip maps to the content switch. You can also get to our site using the hostname url of our machine:

Code:
   hostname.mylibrary.myuniversity.edu = ip 456.456.456.456
The problem I'm having is that any directory access configuration, except the document root, I have to use the hostname url because if I use the www one, I get a 403 Access forbidden error. I WANT to be able to use www for all directories. For example, if I have:

Code:
   <Directory /srv/www/htdocs/foo>
      AllowOverride None
      Order deny,allow
      Deny from all
      Allow from (library ip's)
   </Directory>
I have to use:

Code:
   hostname.mylibrary.myuniversity.edu/foo
But I get a 403 if I use:
Code:
   www.mylibrary.myuniversity.edu/foo
I've tried using Redirect in my config, but that didn't work. Anyone know how to get around this? TIA

- Gavin
 
Old 03-09-2007, 04:58 AM   #2
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
Try following, may work !
Code:
<Directory /srv/www/htdocs/foo>
      AllowOverride None
      Order deny,allow
      Allow from (library ip's)
      Deny from all
</Directory>
 
Old 03-12-2007, 10:06 AM   #3
ThisGuyIKnow
Member
 
Registered: Mar 2006
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks sn 68. I don't understand why you think that would work, but I tried it anyway. No luck. Maybe I didn't explain my problem clear enough. Perhaps you could explain your reasoning?
 
Old 03-12-2007, 01:15 PM   #4
sn68
Member
 
Registered: Oct 2005
Distribution: FC5
Posts: 338

Rep: Reputation: 30
My reasoning was that the syntax gives allow first & deny later, but apparently that doesn't seem to make a difference
The problem could be SElinux policy, something to do with SELinux context labels, in such cases 403 error occurs even though permissions are correct when accessing through www because the context label was wrong
to configure
chcon -R -h -t httpd_sys_content_t /srv/www/htdocs/foo

For more google for - apache "SELinux Security Context File Labels"
 
  


Reply

Tags
apache, selinux


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
how can i config. switches & cisco-routers. rahuldevalone Linux - Networking 2 02-19-2007 08:13 AM
directory content on apache spank Linux - Newbie 1 09-23-2005 02:40 PM
Problems Accesing Content on Apache brokenflea Slackware 2 08-05-2004 01:59 AM
Apache serving content after the content is removed? jrbush82 Linux - Software 6 05-05-2004 04:39 AM
My Apache server is not refreshing content??? rosko Linux - Software 46 12-18-2002 10:26 AM


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