Re: Apache can't use directory not in root partition?
- From: "Roger N. Clark (change username to rnclark)" <username@xxxxxxxxx>
- Date: Sun, 01 Jan 2006 16:33:54 -0700
Roger N. Clark (change username to rnclark) wrote:
Hi, I just brought up red hat workstation 4 and I am trying to get the apache server running.
I have 3 partitions:
/ /home /a
The default httpd.conf file has DocumentRoot "/var/www/html" which works fine, and I can change it to something like /usr/local/html, but if i change it to /home/smith/html or /a/www/html apache fails on startup giving an error at the DocumentRoot line number saying DocumentRoot must be a directory. I've checked multiple times and it is a valid directory and is readable (uid=root gid=root rwxr-xr-x) with same permissions as /var/www/html.
I've also tried setting up virtual hosts, and while I do not get start-up errors, I can't see the contents of the directories on /home or /a, but can see the contents just fine with directories in the root partition.
Any ideas? Or does apache 2.0 need to serve documents in the root partition only? I've been running web servers on linux and/or unix for about a decade and have never had this problem.
Thanks for any help/ideas Roger Clark
I have a partial solution:
The problem is an SELinux issue and is described on this web site:
http://www.siliconvalleyccie.com/linux-hn/apachebasic.htm
"SELinux security context labels can be modified using the chcon command. Recognizing the error, user root uses chcon with the -R (recursive) and -h (modify symbolic links) qualifiers to modify the label of the directory to httpd_sys_content_t with the -t qualifier."
chcon -R -h -t httpd_sys_content_t /var/www/html
So when I do this, everything works in /var/www/html So then I change DocumentRoot to /a/www/html and run the chcon command, but I still can't get it to work there.
Roger .
- Prev by Date: Re: Printer/CUPS-problem
- Next by Date: moving samba & adsl setup to a new distro ?
- Previous by thread: Re: Apache can't use directory not in root partition?
- Next by thread: Printer/CUPS-problem
- Index(es):
Relevant Pages
|