Monday, April 20, 2009
setting up apache to use /home/user dir
just installed apache via:
yum groupinstall "Web Server"
added user:
/usr/sbin/useradd -m jobsite -G apache
couple of things, start the web server using
/etc/init.d/httpd start does start and shows the fedora
start page.
now on to the /etc/httpd/conf directory.
i have changed Document root in httpd.conf to:
DocumentRoot "/home/jobsite"
and commented out all the lines in file /etc/httpd/conf.d/welcome.conf
i now get the following when i try to browse "http://localhost/" :
-------------------------------------- http response -------------------------------------------
Forbidden
You don't have permission to access / on this server.
Apache/2.2.9 (Fedora) Server at localhost Port 80
------------------------------------------------------------------------------------------------
did this
You got "DocumentRoot must be a directory" error even it is really a
directory because of SELinux extensions. Run
system-config-securitylevel (or redhat-config-securitylevel) to
disable SELinux for httpd or give SELinux permissions to that
directory:
chcon -R -h -t httpd_sys_content_t /path/to/directory
More help at: http://fedora.redhat.com/docs/selinux-faq-fc3/index.html
yum groupinstall "Web Server"
added user:
/usr/sbin/useradd -m jobsite -G apache
couple of things, start the web server using
/etc/init.d/httpd start does start and shows the fedora
start page.
now on to the /etc/httpd/conf directory.
i have changed Document root in httpd.conf to:
DocumentRoot "/home/jobsite"
and commented out all the lines in file /etc/httpd/conf.d/welcome.conf
i now get the following when i try to browse "http://localhost/" :
-------------------------------------- http response -------------------------------------------
Forbidden
You don't have permission to access / on this server.
Apache/2.2.9 (Fedora) Server at localhost Port 80
------------------------------------------------------------------------------------------------
did this
You got "DocumentRoot must be a directory" error even it is really a
directory because of SELinux extensions. Run
system-config-securitylevel (or redhat-config-securitylevel) to
disable SELinux for httpd or give SELinux permissions to that
directory:
chcon -R -h -t httpd_sys_content_t /path/to/directory
More help at: http://fedora.redhat.com/docs/selinux-faq-fc3/index.html