Some days did not tidy up knowledge, many new things do not tidy up a long time to forget. It seems that we have to keep on finishing.
Configure XAMPP Multi-port, multisite the following steps:
Multi-Port:
(multiple ports are configured under a single domain to access different programs)
Effects such as:
1, 8080 port installation discuz Forum program, with http://localhost:8080 access.
2, 8081 port under the installation of WordPress blog program, with http://localhost:8081 access.
(1), modify http.conf
In C:\XAMPP\apache\conf, httpd.conf first configures the Apache listening Port .
Under Listen:80 Line, add the following:
listen:8080listen:8081
(2), modify httpd-vhosts.conf
At the bottom of the httpd-vhosts.conf in C:\XAMPP\apache\conf\extra, add the following configuration
#8080 Ports<virtualhost *:8080>ServerName localhost: 8080DocumentRoot"C:/users/yuming/phpstormprojects/project/weike" <directory "C:/users/yuming/phpstormprojects/project/weike" >Options followsymlinks includesnoexec Indexes directoryindex Index. PHP index.html Index.shtml allowoverride None Order Deny, allow to from all</Directory></VirtualHost>#8081 Ports<virtualhost *:8081>ServerName localhost: 8081DocumentRoot"C:/www/web" <directory "C:/www/web" >Options followsymlinks includesnoexec Indexes directoryindex Index. PHP index.html Index.shtml allowoverride None Order Deny, allow to from all</Directory></VirtualHost>
After you save the above modifications, restart the Apache server.
PS: Not successful after reboot may have the following problems to check!
1. Check if the Include conf/extra/httpd-vhosts.conf in the http.conf file is turned on (remove the previous #).
2, page Access 403 error, open D:\xampp\apache\conf\httpd.conf file, about 220 line location, found:
Require all denied
Change to:
# allowoverride None # Require all denied #Require all granted
3, if the above changes appear after the visit localhost, need to vhosts.conf the localhost is also configured as a virtual host. The code is as follows:
<virtualhost *:80> "D:/xampp/htdocs" ServerName localhost <location/ > Order deny,allow deny from all 127.0.0.1 allow from localhost </Location></VirtualHost>
Tips:
After installing XAMPP, configure the method of the virtual host, find the \xampp\apache\conf\extra httpd-vhosts.conf file, remove # # #NameVirtualHost *:80 Front
OK, the above can make XAMPP monitoring the same domain under the different ports.
Multi-site Configuration Reference multi-port configuration method.
XAMPP configuring multi-port, multisite steps