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