Alexander Farber wrote:
Hello,

I'm using the latest CentOS with phpBB 3.0.x + postgreSQL + sendmail
(relayed through gmail.com) - all those programs working fine,
with no big modifications of the CentOS defaults (i.e. SELinux is on).

Now I'm struggling with the seemingly simple problem, that when
I put an .html file into /var/www/html/ then Apache won't serve it.

<SNIP>

I've looked into /etc/httpd/conf/httpd.conf and conf.d/ files...

Does anybody know what is wrong, how to find out?

Regards
Alex

Did you possibly use mv to put the file in that directory? If so, it will not always set the file context properly. You can tell if you will check to see if SELinux is active (run getenforce and see if it returns "Enforcing") and use the -Z switch to ls to see the file context of the problem files. If the context is not "httpd_sys_content_t" or something similar you need to fix the context.

Fixing it is easy, just run restorecon:

restorecon -rv /var/www/html

This will walk down the directory tree and fix up the file contexts, giving you a message about the files it changes.

Of course, if it isn't an SELinux problem, this won't help.
--
Jay Leafey - jay.lea...@mindless.com
Memphis, TN

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to