【说在前面的话】

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

关防火墙,关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)

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

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

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

完美,撒花,敬礼,鞠躬

相关文章:

  • 2021-11-22
  • 2022-12-23
  • 2021-12-28
  • 2021-09-11
  • 2021-06-13
  • 2021-07-07
  • 2021-09-12
  • 2022-01-05
猜你喜欢
  • 2021-12-05
  • 2021-10-17
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
相关资源
相似解决方案