apache 虚拟主机配置 泛域名配置方法
下面提供了三种apahce服务器的域名配置方法哦,第一中是泛域名配置,后面一种是虚拟主机配置哦。好了费话不说多了来看看吧。
<VirtualHost *:80>
ServerName www.zzzyk.com
JkMountFile conf/uriworkermap.properties
</VirtualHost>
<VirtualHost *:80>
ServerName mail.abc.com
ServerAlias *.zzzyk.com zzzyk.com*.abc.com.cn abc.com.cn
RewriteEngine On
RewriteRule ^(.+) http://www.zzzyk.com [R=307]
</VirtualHost>
再提供一种方法
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/usr/local/etc/apache/vhost.map
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/$1
php虚拟主机配置方法。
#<Directory "D:/www/em">
# Options Indexes FollowSymLinks
# Order allow,deny
# Allow from all
# </Directory>
补充:Php教程,apache