WIN10 System configuration Apache Virtual Host

Source: Internet
Author: User

1. Win10on the system, "start" -"All Apps" -"WindowsAccessories " -Notepad, right-click the "Run as administrator" Notepad. Select "File" -" open" menu, go to "C:\Windows\System32\drivers\etc"directory, you do not see any files (Windowshidden), type "file name" at "hosts", press" open ". You can edithostsfile.

2. Copylocalhostthe line, will be the new line of "localhost"Change intoWuxing-testing.info;

127.0.0.1 Wuxing-testing.info

3. Editd:/wamp/bin/apache/apache2.4.9/conf, open the virtual host configuration file:

# Virtual Hosts

Include conf/extra/httpd-vhosts.conf

4. Modifyconf/extra/httpd-vhosts.conf, add the following configuration to the end of the file:

<virtualhost *:80>

documentroot "D:/wamp/www"

ServerName localhost

</VirtualHost>

<virtualhost *:80>

documentroot "D:/wuxing-testing.info"

ServerName wuxing-testing.info

</VirtualHost>

<directory "d:/Wuxing-testing.info" >

Options Indexes followsymlinks

allowoverride All

<ifdefine apache24>

Require Local

</IfDefine>

<ifdefine! Apache24>

Order Deny,allow

# Deny from all

# allow from localhost:: 1 127.0.0.1

allow from all

</IfDefine>

</Directory>

LoadModule Rewrite_module modules/mod_rewrite.so

The configuration is complete.

Hostsdomain name does not takewww, in the virtual host configurationServeralias, trying to getApacheParse Bandwwwdomain name, the discovery is not working at all in the native environment. Maybe it's because "www "This host name andDNSservice closely related to it.

WIN10 System configuration 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.