First open the httpd.conf file in Apache's conf directory and add the following code at the end:
Copy the code The code is as follows:
ServerName www.mydemo.com
DocumentRoot "D:/mydemo"
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
AllowOverride Options FileInfo
Order Deny,Allow
Allow from all
Go to C:->Windows->System32->drivers->etc directory and open hosts document.
Add the following code at the end:
Copy the code The code is as follows:
127.0.0.1 www.mydemo.com
Then create the D: mydemo directory
and then restart the apache server.
Enter www.mydemo.com in your browser to take a look
http://www.bkjia.com/PHPjc/327895.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327895.htmlTechArticleFirst open the httpd.conf file in Apache's conf directory and add the following code at the end: Copy the code as follows: VirtualHost *:80 ServerName www.mydemo.com DocumentRoot "D:/mydemo" Di...