linux 搭建apache 服务器

1、查看apache服务器

/etc/init.d/httpd status

若没有,则使用yum  -y install httpd  安装软件

 

2、设置开机启动

 chkconfig httpd on

3、启动服务

/etc/init.d/httpd start

4、修改apacke服务配置

vim /etc/httpd/conf/httpd.conf 

其中 DocumentRoot 后面的参数就是WEB网站的路径

备注:

  服务无法启动,可添加服务器/etc/hosts解析,添加如下内容:

  公网ip   主机名

 

posted @ 2017-09-05 18:56  john221100  阅读(262)  评论(0编辑  收藏  举报