Home > Backend Development > PHP Tutorial > How to implement multi-website domain name binding in Apache2_PHP tutorial

How to implement multi-website domain name binding in Apache2_PHP tutorial

WBOY
Release: 2016-07-21 15:29:27
Original
783 people have browsed it

Configuration environment
System: win7
PHP version: 5.3.x
MYSQL version: 5.0.27
Apache:2.2.4 (Win32)
Setting method:
Open D:wampbinapacheApache2 .2.17confhttpd.conf
Add
NameVirtualHost *:80 at the end

DocumentRoot "D:wampwwwbbs"
ServerName www.a.com
< ;/VirtualHost>

Note in the configuration:
ServerName *:80
The * here can be changed to the local IP such as 192.168.1.11
NameVirtualHost *:80 VirtualHost *:80 Keep Leave it unchanged
and then write a sentence in the hosts file: 127.0.0.1 www.a.com
(Hosts file location: - Windows NT/2000/XP/2003/Vista default path: %SystemRoot%system32driversetc)
In this way, the domain name a.com will be tied to the root directory of the local machine, which is equivalent to http://localhost or
http://127.0.0.1. It is more convenient to enter www.a.com.

Start the apache service and access it with the above domain name

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323435.htmlTechArticleConfiguration environment system: win7 PHP version: 5.3.x MYSQL version: 5.0.27 Apache:2.2.4 (Win32 ) Setting method: Open D:wampbinapacheApache2.2.17confhttpd.conf and add NameVirtu...
at the end
source:php.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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template