PHP local through mapping, for multi-domain access

Source: Internet
Author: User

PHP local through mapping, for multi-domain access

First step: First in the C drive under the Windows/system32/drivers/etc/hosts file Plus

127.0.0.1 localhost
127.0.0.1 Test
127.0.0.1 www.weishang.com

Step two: Conf/extra/httpd-vhosts.conf under Apache's server

Add the above code:

<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "e:/wamp/www/"
ServerName localhost
Serveralias localhost
Errorlog "Logs/dummy-host.localhost-error.log"
Customlog "Logs/dummy-host.localhost-access.log" combined
</VirtualHost>

<virtualhost *:80>
ServerAdmin [email protected]Test
? DocumentRoot "e:/wamp/www/weishang/mobile/"
ServerNameTest
ServeraliasTest
Errorlog "Logs/dummy-host.Test-error.log "
Customlog "Logs/dummy-host.Test-access.log "combined
</VirtualHost>

<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "e:/wamp/www/weishang/mobile/"
ServerName www.weishang.com
Serveralias www.weishang.com
Errorlog "Logs/dummy-host.www.weishang.com-error.log"
Customlog "Logs/dummy-host.www.weishang.com-access.log" combined
</VirtualHost>

Step three: Find it in the apache/conf/httpd.conf file.

Include conf/extra/httpd-vhosts.conf and Open

Then restart the Apache server

Reference: http://jingyan.baidu.com/article/154b46315e76af28ca8f4135.html

http://hi.baidu.com/baiping588

PHP local through mapping, for multi-domain access

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.