Configure Apache Virtual Host

Source: Internet
Author: User
Tags save file

Xxamp

Open the computer's host file, specific directory: C:/WINDOWS/SYSTEM32/DRIVERS/ETC;

Add the following code at the bottom:

127.0. 0.1        Www.test.com #www. test.com for the name you want to set;

Save the file.

Then open the Xxamp in the Apache configuration file httpd.conf, the specific directory:/xampp/apache/conf; the command to configure the virtual host opens.

# Virtual Hostsinclude conf/extra/httpd-vhosts.conf #将前面的 # removed;

Save the file.

Open the virtual host profile httpd-vhosts.conf, the specific directory:/xampp/apache/conf/extra; Configure the virtual host, copy the code, paste it to the end of the file.

<virtualhost *:>    ServerName www.test.com #此网站为你想设置的网址名称, must be the same as the host file    ; " d:/xampp/htdocs/test "#此目录为项目目录    " d:/xampp/htdocs/test "> #此目录为项目目录 must be the same as above;        directoryindex index.php index.html index.htm        Options Index Es followsymlinks        #支持Rewrite重写        allowoverride all        Order deny,allow        from  All            </Directory></VirtualHost>

Save file, restart apache! Restart apache! Restart apache! The important thing to say three times.

You can access your website by opening the www.test.com URL on your browser.

This method pro-test is suitable for Xxamp environment configuration Virtual host, the system is 64-bit WIN10 system, other integrated environment such as WAMP wait to be tested!

(To be Continued ...) )

Configure Apache Virtual Host

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.