Configure domain name on wamp

Source: Internet
Author: User
: This article describes how to configure domain names on wamp. For more information about PHP tutorials, see. You can also configure multiple domain names and directories. Shield website ads ~~

1. findApacheFind the httpd. conf file in the installation directory. for example, the directory I installed is C: \ wamp \ bin \Apache\Apache2.2.21 \ conf \ httpd. conf

You can also open it through the wamp icon. Find the Virtual hosts and remove the following line before the include #
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

2. C: \ wamp \ bin \Apache\Apache2.2.21 \ conf \ extra \ httpd-vhosts.conf file

Add

#15:02:55 test multiple domain names

ServerAdmin 1439120442@qq.com
DocumentRoot "D:/www/thinkphpTest"
ServerName www.jiayou.com
ServerAlias www.jiayou.com
ErrorLog "logs/www.jiayou.com-errlo. log"
CustomLog "logs/www.jiayou.com-access. log" common

Options FollowSymLinks
AllowOverride all
Order Deny, Allow
Deny from all
Allow from all


Specifically, ServerAdmin, ErrorLog, and CustomLog are optional or you may not configure them.

3. add the following content in C: \ Windows \ System32 \ drivers \ etc \ hosts

#15:06:52 test multiple domain names
127.0.0.1 www.jiayou.com

Various websites can be blocked here.

4. restartApacheService. OK.


The above introduces the configuration domain name on the wamp, including the Apache content, hope to be helpful to friends who are interested in the PHP Tutorial.

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.