虚拟域名配置
1、進入 C:\Windows\System32\drivers\etc 這個文件夾,找到hosts文件,做相應配置;
比如:配置school.com?
# localhost name resolution is handled within DNS itself.127.0.0.1 school.com
# ::1 localhost
?
2、找到 apache的conf/httpd.conf 文件,比如我的是在:D:\phpStudy\Apache\conf,在最后加上如下類似配置:
<VirtualHost *:80>ServerName school.com
DocumentRoot D:\phpStudy\WWW\school\public //這里是你的項目入口
</VirtualHost>這樣就可以通過school.com訪問項目了。
轉載于:https://www.cnblogs.com/chaoyong/p/8483066.html
總結
- 上一篇: plsqldevelop安装教程
- 下一篇: 复习……方法的重载