Wamp virtual directory settings

Source: Internet
Author: User

1. Open the Apache configuration file httpd. conf and remove the # include CONF/extra/httpd-vhosts.conf before #!!

2. Open the Apache/CONF/extra sub-configuration file httpd-vhosts.conf under Apache

3. Delete the original extension configuration file (as follows) under this file: delete one or two

<Virtualhost*: 80>Serveradmin [email protected] DocumentRoot/www/docs/dummy-host2.localhost servername dummy-host2.localhost errorlog logs/dummy-host2.localhost-error_log customlog logs/dummy-host2.localhost-access_log common</Virtualhost>

4. Add at the end of the httpd-vhosts.conf file:

<Virtualhost*: 80>DocumentRoot D:/Wamp/website/a.com servername www.a.com<Directory"D:/Wamp/website/a.com">Options indexes followsymlinks AllowOverride none order allow, deny allow from all</Directory></Virtualhost>

5. Open the hosts file in C:/Windows/system32/Drivers/etc and add the following content

127.0.0.1 www.a.com

6. In this way, we have configured the virtual host named Wamp. Restart the host and enter Wamp in the browser to view the content under the D:/Wamp/WWW directory !!

7. But there is a problem with localhost access. In this case, we need to set localhost as a virtual host.

<Virtualhost*: 80>DocumentRoot D:/Wamp/WWW servername localhost<Directory"D:/Wamp/www">Options indexes followsymlinks AllowOverride none order allow, deny allow from all</Directory></Virtualhost>

8. To allow other computers to access the computer using IP addresses, search for 127.0.0.1 in httpd. conf and change it to all.

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.