Change Apache virtual directory Process

Source: Internet
Author: User

1. Enable httpd-vhosts.conf In the httpd. conf file

Remove #, that is

# Virtual hosts (virtual host) include CONF/extra/httpd-vhosts.conf

2. Set up a VM in the D:/WWW directory (a site needs to be established in advance)

3. Set the http-vhosts.conf file (Path: X:/apachex. X/CONF/extra/http-vhosts.conf)

Add the following content:

# Configure the virtual host <virtualhost 127.0.0.1: 80> DocumentRoot "D:/www/Web" # configure the directoryindex index.html index.htm index on the welcome homepage. php <directory/> options followsymlinks # Do not allow others to modify the website page AllowOverride none # Set the access permission order allow, deny allow from all </directory> </virtualhost>

4. Add the IP ing between our IP address and host in the hosts file (Path: C:/Windows/system32/Drivers/etc/hosts)

Add the following address under 127.0.0.1 localhost:

127.0.0.1 www.xxxx.com

Configuration complete!

 

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.