centos6.5下网络管理之apache配置

【说在前面的话】

因个人做实验,所以直接关防火墙,以免不必要的麻烦

关防火墙,关SElinux

#service iptables stop

#setenforce 0

开始做实验

首先,安装httpd

#yum -y install httpd


安装好后,查看配置文件位置

#rpm -ql httpd

其中/etc/httpd/conf/httpd.conf为apache的配置文件


编辑文件        #vim /etc/httpd/conf/httpd.conf

在命令模式下执行/#ServerName www.exaple.com:80,进行查找

将其修改为ServerName localhost:80,如果之前做了DNS那么修改为域名,例:www.li.com:80


启动httpd服务        #service httpd start


测试 :在/var/www/html/目录下编写index.html网页测试

#vim /var/www/html/index.html

<html><body><h1>is work </h1></body></html>

在浏览器中输入本机192.168.3.33(自己的ip)

用测试网页看下,在浏览器中输入192.168.3.33/index.html

完美,撒花,敬礼,鞠躬

猜你喜欢

转载自blog.csdn.net/LJH_laura_li/article/details/80709570