2

Can SELinux, in any way, cause Apache to only store web-site files on one partition?

I'm unable to set up a localhost HTTP server with apache using html files that are on another mounted partition. I can access the HTML files in /var/www, but not on /media/HTTP_Server/web_files.

1 Answers1

2

You haven't written your configuration. You should tell your os version and apache version in your question. I'm assuming you have 12.04 with apache and selinux set up via the package management system.

A file should be readable by the apache's user. And it is possible that selinux might be blocking the acces to those files. Make sure that /media/HTTP_Server/web_files is universally readable and executable. In case it is not, set it that way:

chmod 755 /media/HTTP_Server/web_files

After this, if the files are still inaccesible, assuming your apache configuration is correct, selinux might be an obstacle for apache. but I have used many servers with ubuntu (lighttpd, nginx, apache) and never had an issue with selinux.

In case everything is ok but the selinux, this tutorial might be helpful.