Wamp Multi-site multiport configuration

Source: Internet
Author: User

1. Configure httpd.conf
Listening to multiple ports

#Listen 12.34.56.78:80
Listen 8081
Listen 8082
Listen 8083

Netstat-n-A can be used to see if the port is turned on

2. Turn on the virtual site

# Virtual Hosts
#Include conf/extra/httpd-vhosts.conf
#修改为
# Virtual Hosts
Include conf/extra/httpd-vhosts.conf

3.php Configuration

Load PHP module, php5apache2_2 is using apache2.2 or later
LoadModule php5_module "C:/php/php5apache2_2.dll"
Phpinidir "c:/php"
Configuring PHP File Type Mappings
AddType application/x-httpd-php. php

4. Configure conf/extra/httpd-vhosts.conf

<virtualhost *:8082>
ServerAdmin [email protected]
DocumentRoot "C:/phpdocroot/site1"
ServerName localhost
Serveralias localhost
Errorlog "Logs/dummy-host.localhost-error.log"
Customlog "Logs/dummy-host.localhost-access.log" common
<directory "C:/phpdocroot/site1" >
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
<virtualhost *:8083>
ServerAdmin [email protected]
DocumentRoot "C:/phpdocroot/site2"
ServerName localhost
Errorlog "Logs/dummy-host2.localhost-error.log"
Customlog "Logs/dummy-host2.localhost-access.log" common
<directory "C:/phpdocroot/site2" >
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>

The actual use of multi-domain name only 80 and then the hosts specify LOCALHOST2 can:

<virtualhost *:80>
DocumentRoot E:/SVNROOT/BFGLOGIC/SRC
ServerName localhost
Serveralias localhost
</VirtualHost>

<virtualhost *:80>
DocumentRoot D:/php/webroot
ServerName Localhost2
Serveralias Localhost2
</VirtualHost>

Last reboot, if error carefully query log

Wamp Multi-site multiport configuration

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.