apache的添加虚拟主机配置
在httpd.conf里设置如下<VirtualHost *>
<Directory "E:/phpworkspace/granary/app/webroot">
Options -Indexes FollowSymLinks
Allow from all
AllowOverride All
</Directory>
ServerAdmin admin@www.granary.com
DocumentRoot "E:/phpworkspace/granary/app/webroot"
ServerName www.granary.com:80
ServerAlias *.www.granary.com
ErrorLog logs/www.granary.com-error_log
</VirtualHost>
然后在C:\WINDOWS\system32\drivers\etc的host文件里面添加主机对应名
Now find the "HOSTS" file, which may be in "C:\WINDOWS\system32\drivers\etc". Save it in same directory as HOSTS without the extention. Add the corresponding lines:
127.0.0.1 localhost
127.0.0.1 www.granary.com
页:
[1]