Windows Apache server Simple configuration Virtual domain name (reprint)

Source: Internet
Author: User

1. Locate the httpd-vhosts.conf virtual host profile under Conf under extra in the Apache directory to copy and paste the following code to the bottom: #<virtualhost *:80>
# ServerAdmin [email protected]
# documentroot "${srvroot}/docs/dummy-host2.example.com"
# ServerName Dummy-host2.example.com
# errorlog "Logs/dummy-host2.example.com-error.log"
# customlog "Logs/dummy-host2.example.com-access.log" common
#</virtualhost> edited into the following code: <virtualhost *:80>
DocumentRoot "F:\project"
ServerName www.thinkphp.com
</VirtualHost> DocumentRoot behind is the root directory of the project (my project directory is in this folder); servername is followed by the virtual domain name, the domain name when accessed in the browser (own definition): 2, Locate the httpd.conf file under the Conf directory in the Apache directory (1) to open the # include conf/extra/httpd-vhosts.conf in the found file, remove the previous # (2) to find #loadmodule Rewrite_ Module modules/mod_rewrite.so, remove the previous # #, set access rights (1) Find code: <directory/>

Options FollowSymLinks
AllowOverride None
Order Deny,allow
Deny from all

</Directory> Add # (#是注释, allow everyone to access) before Deny from all (2) if it is Apache2.4: found: <directory/>
allowoverride None
Require all denied
</Directory> changed to the following: <directory/>
allowoverride None
Require all granted
</Directory> 4. Modify the host file for Windows C: directory: C:\Windows\System32\drivers\etc\host add one row below (the virtual domain name you just set): 127.0.0.1 Www.thinkphp.com Original Address: http://blog.csdn.net/iloveyougirls/article/details/54463668 support original!

Windows Apache server Simple configuration Virtual domain name (reprint)

Related Article

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.