大佬教程收集整理的这篇文章主要介绍了windows 下的 Apache 二级域名 目录绑定配置,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
通常我们注册的域名都是顶级域名 如 www.potatog.com,我们希望这个域名可以访问服务器的不同网站或者不同功能等等 可能会这样 www.potatog.com/api 或者 www.potatog.com/admin,另一种二级域名的方式 api.potatog.com来指向特定目录
顶级域名指定一个目录
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:\xampp\htdocs\"
ServerName www.potatog.com
ErrorLog "C:\xampp\apache\logs\www.potatog.localhost-error.log"
CustomLog "C:\xampp\apache\logs\www.potatog.localhost.access.log" combined
</VirtualHost>
二级域名指定一个目录
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "C:\xampp\htdocs\api"
ServerName api.potatog.com
ErrorLog "C:\xampp\apache\logs\api.potatog.localhost-error.log"
CustomLog "C:\xampp\apache\logs\api.potatog.localhost.access.log" combined
</VirtualHost>
参考:
以上是大佬教程为你收集整理的windows 下的 Apache 二级域名 目录绑定配置全部内容,希望文章能够帮你解决windows 下的 Apache 二级域名 目录绑定配置所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。