首页 > 其他 > 详细

Apach配置本地域名

时间:2016-02-26 12:05:54      阅读:139      评论:0      收藏:0      [点我收藏+]

分三步:

一,开启虚拟域名设置,在路径中找到(apache\apache2.4.9\conf)httpd.conf 配置文件,

去掉 " Include conf/extra/httpd-vhosts.conf "  前面的" # " # Virtual hosts Includeconf/extra/httpd-vhosts.conf

 

二,关联本地目录,在路径找到(apache\apache2.4.9\conf\extra)httpd-vhosts.conf 配置文件


<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\wamp\www\newkir"
ServerName web.kir.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\wamp\www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

 

三,关联本地域名解析,在路径找到(C:\Windows\System32\drivers\etc)hosts 配置文件,添加如下虚拟域名

127.0.0.1 localhost
127.0.0.1 web.kir.com

 

Apach配置本地域名

原文:http://www.cnblogs.com/liangsongbai/p/5219609.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!