PHP How to Configure virtual directory under Windows, PHP virtual directory _php Tutorial

Source: Internet
Author: User

PHP How to Configure virtual directory under Windows, PHP virtual directory


1. First locate the Apache configuration file httpd.conf look for the following code:

# Virtual Hosts
#Include conf/extra/httpd-vhosts.conf

Remove # Include conf/extra/httpd-vhosts.conf #, as follows:

Include conf/extra/httpd-vhosts.conf

Save.

2. Open the httpd-vhosts.conf file under the Extra folder in the Apache conf directory, open it with Notepad, and add the following code at the end:

1 
 
  
  
   2 ServerName Www.mydemo.
  
   com
  
   3 documentroot "D:/mydemo"
  
    4 
  
   
   
     5 
   
    Options FollowSymLinks includesnoexec Indexes
   
     6 directoryindex index.html index.htm 
   
    Default . htm index.php default. 
   
    php index.cgi default 
   
    . CGI index.pl 
   
    Default . PL index.
   
    shtml
   
    7 
   
    allowoverride Options FileInfo
   
    8 Order Deny, allow
   
    
   
     9 
   
    
   
     
  
   
  
    One 
 
  

3. Then to the C:->WINDOWS->SYSTEM32->DRIVERS->ETC directory, open the Hosts file.
Add the following code at the end:

1 127.0.0.1 www.mydemo.com

And then create the D:\mydemo directory
Then reboot the Apache server.
Look at the browser input www.mydemo.com

http://www.bkjia.com/PHPjc/1048750.html www.bkjia.com true http://www.bkjia.com/PHPjc/1048750.html techarticle PHP Configuration virtual directory under Windows method, PHP virtual directory 1. First locate the Apache configuration file httpd.conf look for the following code: # Virtual hosts #Include conf/extra/ Httpd-vhosts.co ...

  • 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.