apache服务

Posted zhengjunfeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache服务相关的知识,希望对你有一定的参考价值。

1。临时关闭防火墙 service iptables stop (chkconfig iptables off)

    临时selinux: setenforce 0

     永久关闭selinux: vim /etc/sysconfig/selinux

       将 SELINUX=disabled

2. 加载httpd协议软件包:yum install httpd -y

3.修改配置文件   vim /etc/httpd/conf/httpd.conf

       文件存储所在位置(DocumentRoot): ‘/var/www/html

4service httpd restart

比较:echo ‘test‘>>/var/www/html/index.html

            echo  ‘test’>>/var/www/html/a.txt

5.网络测试

以上是关于apache服务的主要内容,如果未能解决你的问题,请参考以下文章