先打开Apache的conf目录下的httpd.conf文件,在末尾添加如下代码:
复制代码 代码如下:
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
复制代码 代码如下:
127.0.0.1 www.mydemo.com