"PHP Programming Path-1" setting Apache virtual directory

Source: Internet
Author: User

Overview

Setting up the Apache virtual directory

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:

[PHP]View Plaincopy
    1. # Virtual Hosts
    2. # Include Conf/extra/httpd-vhosts.conf

Switch

[PHP]View Plaincopy
    1. # Virtual Hosts
    2. Include 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:

[PHP]View Plaincopy
    1. <directory/>
    2. allowoverride None
    3. Require all denied
    4. </Directory>

Switch

[PHP]View Plaincopy
    1. <directory/>
    2. allowoverride None
    3. </Directory>

3. Add a virtual directory

File path: \wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

Add a virtual directory

[PHP]View Plaincopy
    1. <virtualhost *:80>
    2. ServerAdmin [email protected]
    3. DocumentRoot "D:/_helloworld/01_myprojects/06_php/01_web/product/source/shop"
    4. ServerName web.shop.com
    5. Errorlog "Logs/web.shop.com-error.log"
    6. Customlog "Logs/web.shop.com-access.log" Common
    7. </VirtualHost>


4. Restart Apache

5. Enter web.shop.com in the browser

"PHP Programming Path-1" setting Apache virtual directory

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.