1.apache配置文件中打开vhost的配置
LoadModule vhost_alias_module modules/mod_vhost_alias.so
Include conf/extra/httpd-vhosts.conf
2.extra目录中的httpd-vhosts.conf
里面进行配置,有三个:第一个DocumentRoot,项目的绝对目录,后面以/结尾;第二个是ServerPath,与DocumentRoot一致;第三个是ServerName,自己在浏览器中输入的域名。如:test.123.cn
3.在hosts文件中位域名指向。如:127.0.0.1 test.123.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn