1. Turn on the "virtual directory configuration file" httpd-vhosts.conf
File path: \wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
Configure the following:
# Virtual hosts# Include conf/extra/httpd-vhosts.conf
Switch
# Virtual Hostsinclude conf/extra/httpd-vhosts.conf
2. Set the virtual directory to access
File path: \wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
Configure the following:
<directory/> allowoverride none Require all denied</directory>
Switch
<directory/> allowoverride none</directory>
3. Add a virtual directory
File path: \wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf
Add a virtual directory
<virtualhost *:80> ServerAdmin [email protected] DocumentRoot "d:/_helloworld/01_myprojects/06_php/ 01_web/product/source/shop " ServerName web.shop.com errorlog" Logs/web.shop.com-error.log " Customlog "Logs/web.shop.com-access.log" common</virtualhost>
4. Restart Apache
5. Enter web.shop.com in the browser
Jackson Source: http://blog.csdn.net/jackson0714/article/details/44139893 This article is copyright to the author and Csdn blog share, welcome to reprint, but without the author's consent must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility. If you feel that there is help, you can click on the "top", hoping to continue to bring good technical articles for everyone! Want to make progress with me? Then "pay attention" to me.
"PHP Programming Path-1" setting Apache virtual directory