码迷,mamicode.com
首页 > Web开发 > 详细

HTTP配置

时间:2017-05-23 10:20:28      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:配置文件   服务器   service   share   根目录   

1 启动httpd服务

# service httpd  restart

 

2 用另外一台机器测试网页

http://172.16.40.180

 


 

3 apache配置文件, 服务器监听端口80 文档根目录:/var/www/html

  /etc/httpd/conf/httpd.conf

 

关键参数:

DocumentRoot  “/var/www/html”

ServerName    172.16.40.180:80

检查配置文件:   #apachectl configtest

                 #httpd  -t

 

4 拷贝另外一个文件作为测试页面:

# cp /usr/share/doc/HTML/zh-CN/index.html  /var/www/html/


HTTP配置

标签:配置文件   服务器   service   share   根目录   

原文地址:http://newcourage.blog.51cto.com/9969933/1928432

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!