作者:lucky2502882647 | 来源:互联网 | 2014-06-17 10:53
下面提供了三种apahce服务器的域名配置方法哦,第一中是泛域名配置,后面一种是虚拟主机配置哦。好了费话不说多了来看看吧。
-
- ServerName www.phpfensi.com
- JkMountFile conf/uriworkermap.properties
-
-
- ServerName mail.abc.com
- ServerAlias *.phpfensi.com phpfensi.com*.abc.com.cn abc.com.cn
- RewriteEngine On
- RewriteRule ^(.+) http:
-
再提供一种方法
- 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虚拟主机配置方法。
- #
- # Options Indexes FollowSymLinks
- # Order allow,deny
- # Allow from all
- #