Apache is powerful ah, a simple configuration can then open another port Web services.
I recently used XAMPP to set up PHP server. There are some special needs: the same code that needs to start a different port,
The protocol type provides the Web service to the client (HTTP/HTTPS).
HTTP Service Port multiple open
Configuration method:
Open httpd.conf in
Listen 80
Add the following
Listen 8080
Then open conf/extra/httpd-vhosts.conf.
Add to
<*:8080>ServerAdmin [email protected]documentroot "d:/develop/xampp/ Htdocs/dummy-host2.example.com "ServerName Dummy-host2.example.comerrorlog" Logs/dummy-host2.example.com-error_ 8080.log "Customlog" Logs/dummy-host2.example.com-access_8080.log "common</VirtualHost >
HTTPS Service Port multiple open
Configuration method:
Open it
httpds-vhosts.conf add
<VirtualHost*:8081>documentroot "D:/develop/xampp/htdocs" ServerName www.example.com:8081ServerAdmin [email Protected]errorlog] d:/ Develop/xampp/apache/logs/error_8081.log "Transferlog" D:/develop/xampp/apache/logs/access_8081.log "SSLEngine Onsslcertificatefile "CONF/SSL.CRT/SERVER.CRT" Sslcertificatekeyfile "Conf/ssl.key/server.key "<FilesMatch"\. (cgi|shtml|phtml|php) $ ">ssloptions +stdenvvars</FilesMatch><Directory"D:/develop/xampp/apache/cgi-bin">ssloptions +stdenvvars</Directory>browsermatch "MSIE [2-5]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0customlog "d:/develop/ Xampp/apache/logs/ssl_request_8081.log ""%t%h%{ssl_protocol}x%{ssl_cipher}x \ "%r\" %b "</VirtualHost>
The above configurations are not mutually exclusive. Change to restart Apache service at the same time to start 80/8080,443/8081 service
Apache Virtual Host/Port multi-Open