首页 > 源码编译apache2.4.23无法启用selinux保护

源码编译apache2.4.23无法启用selinux保护

我在centos7中用源码编译了apache2.4.23,用的以下configure

./configure --prefix=/opt/server/apache2.4.23
--enable-so   
--with-crypto        
--enable-mpms-shared=all        
--enable-mods-shared=all(most)         
--enable-proxy-http2
--enable-static-support

网站根目录在/home/wwwroot中,下面分别有web1,web2,web3三个站。
apache启动正常,但是发现selinux无法起到屏蔽的作用,/home/wwwroot的类型是user_home_t,按理说必须是httpd_sys_content_t类型才能被访问的。

查了很多网站,最后知道SELinux只限定在Domain中的process,不在Domain中的process不受限制.,试着给/opt/server/apache2.4.23/bin/httpd添加httpd_exec_t,但是启动出错!!

请问有谁知道该怎么办吗?

【热门文章】
【热门文章】