I want to move my Apache webserver directory. I've looked at literally dozens of websites that claimed to tell you how to do this, and basically they all just said "Oh that's easy, just change DocumentRoot and you're golden." Well I did, and I'm not.
I changed DocumentRoot.
I tried changing the <Directory> settings. (See conf file below)
I've restarted httpd and rebooted the system.
I set the SELinux type to httpd_sys_content_t on my DocumentRoot and on the index.html:
Code:
# semanage fcontext -a -t httpd_sys_content_t "/test(/.*)?"
# restorecon -R -v /test /test/index.html
# ll -dZ /test /test/index.html
drwxr-xr-x. 2 apache apache unconfined_u:object_r:httpd_sys_content_t:s0 24 Mar 30 14:03 /test
-rw-r--r--. 1 apache apache unconfined_u:object_r:httpd_sys_content_t:s0 22 Mar 30 14:03 /test/index.html
I took care of /etc/httpd/conf/welcome.conf so the "you haven't set up Apache yet" message doesn't display. But all I get is "403 Forbidden: You don't have permission to access this resource."
What am I missing?
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 "/test"
#
# Relax access to content within /var/www.
#
<Directory "/test">
AllowOverride None
# Allow open access:
Require all granted
</Directory>