Configure a virtual domain name

Source: Internet
Author: User

Configure the virtual domain name in the WAMP environment:

1. Open Apache's mod_rewrite function module

2. Introduction of http-vhosts.conf Files

3. Add VirtualHost Configuration

Found in: wamp/bin/apache/apache2.4.9/conf/httpd.conf configuration Files

Open: Find rewrite, find rewrite.so this line, take # to remove, say open rewrite

Search for vhosts.conf and remove its comments

Then follow this path of vhosts to find httpd-vhosts.conf this file, open

This is the example of configuring the domain name

Just follow the example and do whatever you want.

Note: The port number should be the same as the Apache port.

Errorlog and Customlog error logs and access directories may not be configured

To open access permissions for the specified working directory: documentroot:

In the Apache configuration file, Ctrl+g searches for 188 lines and copies the code

Copy to the virtual domain name, modify the path, is the <Directory> tag, add DocumentRoot path

Then change deny to allow everyone to access

Last modified Host file: C:\Windows\System32\drivers\etc

Writes the set virtual domain name to the 127.0.0.1 virtual domain name

Restarting Apache is OK!

Configure a virtual domain name

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.