1. Install WAMPSERVER2. Managing HTTP Services
Task icon Green for normal start state
Precautions:
1, check the network is not through the ping the other IP
2, check whether the firewall is turned on, if the open will not be properly accessed
3. Check access permission allow from all
4. Ensure that the port is not occupied by other programs
3. Configure the root directory:
The Web site root is the space on the Web server where the Web site program resides
3.1 Open configuration file, console selection or Wampserver installation directory under bin\apache\apache2.2.21\conf\httpd.conf
3.2. Set root directory, find and modify
can be modified to
This specifies the root directory where the site is stored
3.3. Configure the root directory
can be modified to
3.4, after the modification, and can not immediately take effect, need to restart Apache
4. Website deployment
Copy The pages we have made to the configured root directory, and the browser can access the 127.0.0.1.
5. Configure the virtual host
On a Web server, we can manage multiple sites by configuring the virtual host and then setting the root directory separately.
5.1, open the Virtual host auxiliary configuration, found in the httpd.conf
Remove the previous # comment to turn on the virtual host configuration
5.2, configure the virtual host, open conf/extra/httpd-vhosts.conf
Modify the following three items, respectively
DocumentRoot "E:/www/example"
ServerName "example.com"
Serveralias "www.example.com"
5.3. Modify the DNS (hosts) file to open the C:\Windows\System32\drivers\etc\hosts directory is fixed
Note: Modify the Hosts file permissions
6. Restart Apache Browser access www.example.com
Windows Environment Configuration HTTP Service (Windows + Apache + Mysql + PHP)