Bill: Use xampp3.2.2 to configure multiple listening ports and different site directories under Windows

Source: Internet
Author: User

Use xampp3.2.2 to configure multiple listening ports and different site directories under Windows

One: Configure Apache file httpd.conf

Open Apache configuration file httpd.conf, which can be opened by clicking on Apache (httpd.conf) under Xampp Apache CONFIG.
First in Listen 80
The following add a listening port as

Listen 8001Listen 8002
    • 1
    • 2

Then insert the last position in the httpd.conf:

NameVirtualHost *:8001<VirtualHost *:8001>ServerName localhost:8001DocumentRoot "D:/xampp/htdocs1"</VirtualHost>NameVirtualHost *:8002<VirtualHost *:8002>ServerName localhost:8002DocumentRoot "D:/xampp/htdocs2"</VirtualHost>
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11

Then put the following places

Modified to:

<Directory />    #AllowOverride none    #Require all denied    Order deny,allow    Allow from all</Directory>
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6

Close the file httpd.conf.

Two: Open windows 8001, 8002 port

You can set up new rules, such as outbound rules, advanced settings, Windows Firewall.

Three: New Site Directory folder

Four: Restart Apache service five: Browser view results

Http://localhost:8001/index.html

Http://localhost:8002/index.html

Copyright NOTICE: Welcome Reprint 75646344

Bill: Use xampp3.2.2 to configure multiple listening ports and different site directories under Windows

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.