Phpstudy How to configure multi-site and multi-domain and Multiport instances

Source: Internet
Author: User
This article mainly introduced the Phpstudy configuration Multi-site multi-domain and the multi-port method, has the certain reference value, has the interest to be possible to understand

This article describes the Phpstudy configuration multi-site multi-domain and multiport method, share to everyone, but also to leave a note

The WWW directory has three project directories: a b C

Apache default httpd port is 80, Site Directory is D:\WWW\a

1. Configure multi-domain multi-site

The first step: click on the "Other options menu" +-site domain name management and set the following three site domain names:

(1) Website domain name: a.com Site Directory: D:\WWW\a website port: 80

(2) Website domain name: B.Com Site Directory: D:\WWW\b website port: 80

(3) Website domain name: c.com Site Directory: D:\WWW\c website port: 80

Save the configuration and generate the configuration file;

Step Two: Open the Hosts.txt file and add the following to the end of the file:

127.0.0.1 localmall.com
127.0.0.1 ynb.com
127.0.0.1 admintest.com

Restart Apache, so multi-domain multi-site Configuration OK, the port has not changed is 80

2. Configure multi-port

The first step setting changes to:

(1) Website domain name: a.com Site Directory: D:\WWW\a website port: 80

(2) Website domain name: B.Com Site Directory: D:\WWW\b website Port: 81

(3) Website domain name: c.com Site Directory: D:\WWW\c website port: 82

Step two Ibid.

Step three: Open the configuration file httpd.conf, locate the listening port location Listen 80, and add the following:

Listen 81
Listen 82

Restart the server and open the Vhosts.conf configuration file to see if you have the following:


<virtualhost *:80>  documentroot "D:\WWW\a"  ServerName a.com serveralias phpstudy.net  < Directory "D:\WWW\a" >   Options followsymlinks execcgi   allowoverride all   Order allow,deny   allow From all   Require all granted </directory></virtualhost><virtualhost *:81>  documentroot "D : \www\b "  ServerName b.com  serveralias  <directory" D:\WWW\b ">   Options followsymlinks execcgi   allowoverride All   Order allow,deny-   Require all   granted </Directory> </virtualhost><virtualhost *:82>  documentroot "D:\WWW\c"  ServerName c.com  Serveralias  <directory "D:\WWW\c" >   Options followsymlinks execcgi   allowoverride all   Order allow,deny to all   Require all Granted </Directory></VirtualHost>

If present, the configuration is successful.

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.