想知道为什么我的虚拟主机只有在 SELinux 设置为“permissive”时才能工作。当 SELinux 设置为“强制”时,我的虚拟主机将被忽略并显示默认主机。
Apache/2.2.15 (Unix)
这是我的 httpd.comf: http://pastebin.com/2LRzLZ8Z
虚拟文件包含:
<VirtualHost *>
DocumentRoot "/srv/vhosts/foo.com/htdocs"
ServerName mysite.com
<Directory "/srv/vhosts/foo.com/htdocs">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
作品:
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
不起作用:
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted