apache virtualhost配置 apache配置多个网站

第一步

apache下httpd.conf文件

启用模块LoadModule vhost_alias_module modules/mod_vhost_alias.so

第二步

apache下httpd.conf文件,启用文件Virtual hosts
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

NameVirtualHost *:80

<VirtualHost *:80>

DocumentRoot D:\wamp\www

ServerName localhost

</VirtualHost>

<VirtualHost *:80>

DocumentRoot D:\wamp\www\58qd.cn

ServerName localhost.58qd

</VirtualHost>

<VirtualHost *:80>

DocumentRoot D:\wamp\www\sc\dz-bbs\upload

ServerName localhost.bbs.58qd

#Directory 这段可以不写

<Directory D:\wamp\www\sc\dz-bbs\upload>

Order deny,allow

Allow from all

</Direcotry>

</VirtualHost> 

<VirtualHost *:80>

DocumentRoot D:\wamp\www\freeviicms

ServerName localhost.wx

</VirtualHost> 

apache virtualhost配置 apache配置多个网站

apache virtualhost配置 apache配置多个网站

上一篇:js的高级知识---词法分析


下一篇:meta标签中的http-equiv属性使用介绍(转载)