摘要:本篇Windows运维将讲解本地apache虚拟主机配置方案,看完这篇文章会让你对虚拟主机配置的知识点有更加清晰的理解和运用。
本篇Windows运维将讲解本地apache虚拟主机配置方案,看完这篇文章会让你对虚拟主机配置的知识点有更加清晰的理解和运用。
1.打开C:/windows/system32/drivers/etc/hosts
添加127.0.0.1 www.yourwebsite.com
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 www.yourwebsite.com
2.打开本地apache配置文件/apache/conf/httpd.conf
找到Include "conf/extra/httpd-vhosts.conf" 集成工具会有这个,若没有跳过这步
<VirtualHost 127.0.0.1:*>
ServerName www.yourwebsite.com
DocumentRoot "/xampp/xampp-portable/htdocs/yourwebsite"
<Directory "/xampp/xampp-portable/htdocs/yourwebsite">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
希望这篇文章可以帮助到你。总之,同学们,你想要的职坐标IT频道都能找到!
您输入的评论内容中包含违禁敏感词
我知道了
请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号