Windows Environment Configuration HTTP Service (Windows + Apache + Mysql + PHP)

Source: Internet
Author: User
Tags file permissions

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.