Wamp: Configure virtual hosts and wamp Virtual Hosts

Source: Internet
Author: User

Wamp: Configure virtual hosts and wamp Virtual Hosts

1. Open the apache configuration file httpd. conf and remove the # Before # Include conf/extra/httpd-vhosts.conf to enable the VM Function

 

2. Find the apache configuration file httpd-vhosts.conf (My wamp under drive F: \ wamp \ bin \ apache \ Apache2.4.4 \ conf \ extra \ httpd-vhosts.conf, open and add the following at the end of the file:

# Configure the virtual site <VirtualHost *: 80> # website root directory DocumentRoot "F: \ wamp \ www \ test" # domain name ServerName www.test.com # Here configure the welcome homepage # DirectoryIndex index. php <Directory/> Options FollowSymLinks # Do not allow others to modify our page AllowOverride None # Set the access permission order Allow, deny allow from all </Directory> </VirtualHost>

Website root directory: F: \ wamp \ www \ test, test folder, domain name www.test.com (enter this domain name after configuration to open the website under the test directory ), welcome Page, that is, the entry file: index. php. If the project contains index. php does not need to be written here, because the system will automatically find the index of the entry file. php.

 

3. Modify the hosts file. Path: C: \ Windows \ System32 \ drivers \ etc \ hosts. Add the following at the end of the file:

127.0.0.1       www.test.com

 

4. Now the configuration is complete. Restart apache and enter www.test.com to enter the configured website.

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.