# yum install policycoreutils-python
And then for every file or directory which web server has write access, set the policy:
# semanage fcontext -a -t httpd_sys_rw_content_t "/path/to/directory(/.*)?"
With above command, "/path/to/directory" and sub directory will have httpd_sys_rw_content_t context, which allow http to write into file or directory.