Home> php教程> PHP开发> body text

Configuring virtual host in WampServer3 environment

巴扎黑
Release: 2016-11-07 16:31:10
Original
2285 people have browsed it

Preparation: Download the WampServer3 installation package and install it successfully (it is recommended to download the new version, the old version has too many bugs and the file path settings are messy)

1. Find the http.conf file in the conf directory of apache, and remove the # sign in front of the following two settings

#LoadModule vhost_alias_module modules/mod_vhost_alias.so

#Include conf/extra/httpd-vhosts.conf

2. Add another Listen 0.0.0.0:8088 port below Listen 0.0.0.0:80 (to achieve multi-port configuration )

3. Find the httpd-vhosts.conf file under the confextra folder, first keep the original route of the server

Xml code

NameVirtualHost *:80

ServerName localhost

DocumentRoot D:/wamp64/ www

t t t

t t t n

Require Local

w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w w

3.1 U (ZENDSTUDIO12.5 is my workspace folder, wamp64 is my installation path)

Xml code

ServerName zendstudio125.com

ServerAlias www.zendstudio125.com

DocumentRoot D:/wamp64/zendStudio12.5

options

ServerName zendstudio125.com

ServerAlias www.zendstudio125.com

DocumentRootD:/wamp64 /zendstudio12.5


Options+INDEXES+Includes+FollowSymlinks+Multiviews Allowoverride all Require Local Find the hosts file under SSYSTEM32Driversetc and add it in it The domain name specified above 127.0.0.1 zendstudio125.com (The most important step, save and exit) PS. Specifying the domain name in this step is very important. I saw that many configuration introductions on the Internet do not emphasize the step of modifying system files. With this step specified, the browser can resolve the domain name to the virtual host setting corresponding to apache 5. Restart the apache service, create a new test.php file in the zendstudio12.5 folder, and test the following statements
Related labels:
php
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 Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!