Httpd can't access file even after setting httpd_sys_content_t

You can clone the configuration from the directory /var/www/html:

chcon -R --reference=/var/www/html /path/to/your/project  

My mistake. This is not SELinux's fault. The tutorial on red hat is not complete. We should also add the following to the httpd configuration file(for apache httpd 2.4):

<Directory "/mywebsite">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>