yum install httpd html
如:要想访问/usr/local/temp/report下面的文件index.htmllinux
就须要在/etc/httpd/conf/httpd.conf添加以下配置文件:ide
<VirtualHost *:80>
DocumentRoot /usr/local/temp/report
<Directory /usr/local/temp/report>
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>rest
a、临时关闭(不用重启机器):htm
setenforce 0 设置SELinux 成为permissive模式blog
setenforce 1 设置SELinux 成为enforcing模式
b、修改配置文件须要重启机器:
修改/etc/selinux/config 文件
将SELINUX=enforcing改成SELINUX=disabledci