Home > Backend Development > PHP Tutorial > apache配置虚拟主机的方法详解_php技巧

apache配置虚拟主机的方法详解_php技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-17 09:01:08
Original
1138 people have browsed it
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
Related labels:
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
Latest Issues
Apache automatically stops
From 1970-01-01 08:00:00
0
0
0
apache restart failed
From 1970-01-01 08:00:00
0
0
0
apache error
From 1970-01-01 08:00:00
0
0
0
How apache logs
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template