My instruction are:
Code:
su -
chmod 711 /home/marc
chmod 755 /home/marc/Public
setsebool -P httpd_enable_homedirs 1
chcon -R -t httpd_sys_content_t /home/marc/Public
vi /etc/httpd/conf/httpd.conf
Should have these in your httpd.conf
Code:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/var/www/html"
DocumentRoot "/home/marc/Public"
#
# This should be changed to whatever you set DocumentRoot to.
#
#<Directory "/var/www/html">
<Directory "/home/marc/Public">
Then you restart Apache
Code:
service httpd restart
I got the chmod 711/755 from that same httpd.conf:
Code:
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
# The path to the end user account 'public_html' directory must be
# accessible to the webserver userid. This usually means that ~userid
# must have permissions of 711, ~userid/public_html must have permissions
# of 755, and documents contained therein must be world-readable.
# Otherwise, the client will only receive a "403 Forbidden" message.
#
# See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
#
But remember, you are changing your web files LIVE. I build my web site on another PC then sftp to my web server. If I want to make a quick fix, I use Quanta Plus. Then update my development box.