下面提供了三种apahce服务器的域名配置方法哦,第一中是泛域名配置,后面一种是虚拟主机配置哦。好了费话不说多了来看看吧。
- <VirtualHost *:80>
- ServerName www.phpfensi.com
- JkMountFile conf/uriworkermap.properties
- </VirtualHost>
- <VirtualHost *:80>
- ServerName mail.abc.com
- ServerAlias *.phpfensi.com phpfensi.com*.abc.com.cn abc.com.cn
- RewriteEngine On
- RewriteRule ^(.+) http:
- </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>
|