配置域名
1. 打开 hosts 文件
配置域名
如果hosts 文件无法 保存 找到文件位置 右击 属性 把里面的权限给一下就ok 了
2. 打开vhosts-conf 文件
配置 地址代码
NameVirtualHost *:80 <VirtualHost *:80> ServerName www.lzx.com 域名 DocumentRoot "d:/web1/" 访问地址 <Directory "d:/web1/"> 访问地址 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 </Directory> </VirtualHost>
3. 打开 httpd.conf 开启 Include conf/vhosts.conf