XAMPP installation, multi-domain multiport configuration, coexistence with Python environment in Windows environment

Source: Internet
Author: User
Tags yii

First, go to XAMPP official website to download the latest version of the installation package, install the General Software installation procedures, the next step, but if you want to install in the specified directory, select the installation location to set the location you want to install.

Second, we often encountered in the work of debugging multiple sites at the same time, then how to configure it? As usual visit website, website a.com and website B.Com
Different. This is a common phenomenon, if you want to access multiple sites on another computer in a local area network, you need to use the http://192.168.1.10/form of access, rather than
The HTTP://LOCALHOST/,HTTP protocol default port number is
80, if we can set a different port number, so that the server "listener" to find different services, wouldn't it be better?

The most recent form of access may look like this (where the port number is not recommended for use by the system (i.e., less than 1024):

http://192.168.1.10:8080/

http://192.168.1.10:8081/

http://192.168.1.10:8082/

We use XAMPP build, the bottom of the APACHE, this article configuration method is not only applicable to XAMPP, but also applicable to any installed APACHE machine. Let's do it together. Configuration under:

XAMPP Installation path: D:\XAMPP

* Web root directory: D:\xampp\htdocs

*apache Location: D:\xampp\apache

Configuration method

1, create more than 2 different site Directory, store different website program, Xiaoming created as follows:

(1) D:\xampp\htdocs\dedecms_test (storage Yii program)

(2) D:\xampp\htdocs\discuz_test (storage Magento program)

2, configure 2 domain names (can be arbitrary): www.a.com, www.b.com, they all point to the 127.0.0.1 (this machine)

(1) Notepad opens C:\Windows\System32\drivers\etc\hosts * Firefox installs a hostadmin plugin for easier setup.

(2) Add the following code to the bottom of the file and save it:

127.0.0.1 www.a.com

127.0.0.1 www.b.com

3, Notepad edit D:\xampp\apache\conf\httpd.conf, add the port that need to be monitored at the top: 8080, 8081, leave the default listening 80 port

Listen 80

Listen 8080

Listen 8081

4, if you want to implement different ports (http://localhost:8080/, http://localhost:8081/) to access different sites, you need to add at the bottom of the file:

# Multi-Port virtual host configuration #

<virtualhost *:8080>

ServerName localhost

DocumentRoot D:\xampp\htdocs\yii

</virtualhost>

# dedecms_test #

<virtualhost *:8081>

ServerName localhost

DocumentRoot D:\xampp\htdocs\yii

</virtualhost>

If you want to use different domains to access different websites, you need to add them at the bottom:

# Multi-domain Virtual host configuration #<virtualhost *:80>

ServerName www.a.com

DocumentRoot D:\xampp\htdocs\yii

</virtualhost># Dedecms_test #

<virtualhost *:80>

ServerName www.b.com

DocumentRoot D:\xampp\htdocs\magento

</virtualhost>

5. The most important step is to restart the Apache service. Browser input: http://localhost:8080/, http://localhost:8081/, http://www.a.com/, http://www.b.com try Wow ~

6, however, if you need to install the Python environment, there may be conflicts, because the 443 port of VMware is Apche occupied, so we might as well to change the Apache 443 port to other, such as 442

XAMPP installation, multi-domain multiport configuration, coexistence with Python environment in Windows environment

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.