Identity role domain (type) identity role domain James male in male restroom small red female in female restroom enable selinux setup to modify the configuration file # vim/etc/selinux/configSELINUX = enforcingSELINUXTYPE = targeted to ensure normal auditing and some graphic management tools are normal, make sure that the following services enable [*] auditd [*] messagebus [*] setroubleshoot related tools # getsebool-a # system-config-selinux 1. Combine Apache with Selinux 1. Customize virtual when the host is restarted using the custom website root directory, it will be protected by selinux, and cannot work normally. 2. Configure selinux to make apache work normally. a. You can see that apache is not working properly through the graphical interface. This is caused by selinux # sealert-bb, And you can determine through commands # sealert-/ var/log/audit. log # ls-lZd/var/www/html/drwxr-xr-x root system_u: object_r: httpd_sys_content_t: s0/var/www/html/# chcon-R-t httpd_sys_content_t/share/or # chcon-R -- reference/var/www/html // www