Apache 2.4 configurations

atorex used Ask the Experts™
Hi Im attempting to move my HTTP file server from an Ubuntu server to a RedHat 7 server, I have the virtual host configured per below but I'm getting a 403 forbidden error on the RedHat any help would be appreciated.

<VirtualHost *:80>
        ServerAdmin adm@mydomain.com
        DocumentRoot /mnt/HTTP
        ServerName GTHTTP.mydomain.int
        ServerAlias www.GTHTTP.mydomain.int
        ErrorLog "/var/log/httpd/gthttp.mydomain.int.error_log"
        CustomLog "/var/log/httpd/mydomain.int-access_log" common
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

The Apache user probably does not have read/write permissions on '/mnt/HTTP' or the log file directories.
I have permission set to 777 one the directory so it should be available however it still does not, the log shows the below.

[Thu Mar 24 15:49:04.702344 2016] [core:error] [pid 13262] (13)Permission denied: [client] AH00035: access to / denied (filesystem path '/mnt/HTTP') because search permissions are missing on a component of the path

I then changes selinux settings to permissive and I no longer get 403 error, I now get to the apache page as if no configuration exists.
I have to be missing something on my conf file.
Distinguished Expert 2017

redhat stores the files in /var/www
you should not disable selinux as it is there to shield your system from compromises but if compromised to prevent your system from disseminating

/mnt is as was pointed out a temporary mount point and should not be used for something as permanent as a site, why not copy the file to /var/www/mysite and configure the virtualhost accordingly?


I have figured out the cause of the issue, it was due to selinux.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial