apache配置虚拟主机的方法详解
<p><strong><font>1.apache配置文件中打开vhost的配置</font></strong><br>
LoadModule vhost_alias_module modules/mod_vhost_alias.so<br>
Include conf/extra/httpd-vhosts.conf<br><br><strong><font>2.extra目录中的httpd-vhosts.conf</font></strong><br>
里面进行配置,有三个:第一个DocumentRoot,项目的绝对目录,后面以/结尾;第二个是ServerPath,与DocumentRoot一致;第三个是ServerName,自己在浏览器中输入的域名。如:test.123.cn<br><br><strong><font>3.在hosts文件中位域名指向。如:127.0.0.1 test.123.cn</font></strong></p>
頁:
[1]