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:
123 |
Listen: 8080 Listen: 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端口 <virtualhost *:8080> ServerName localhost:8080 documentroot "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 </Directory></VirtualHost> #8081端口 <virtualhost *:8081> ServerName localhost:8081 documentroot "C:/www/web" <directory "C:/www/web" > Options followsymlinks IncludesNOEXEC Indexes directoryindex index.php index.html index.shtml allowoverride None Order Deny, Allow to </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:
allowoverride None Require all denied
Change to:
#AllowOverride None #Require all denied allowoverride all #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> documentroot "d:/xampp/htdocs" ServerName localhost <location/> Order Deny,allow deny from all to allow from 127.0.0.1 to 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.
Windows XAMMP Multi-port Access project