apache 虚拟主机配置 泛域名配置方法

作者:袖梨 2022-07-02

ServerName www.111com.net

JkMountFile conf/uriworkermap.properties

ServerName mail.abc.com

ServerAlias *.111com.net  111com.net*.abc.com.cn abc.com.cn

RewriteEngine On

        RewriteRule ^(.+) http://www.111com.net [R=307]

再提供一种方法

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
#

相关文章

精彩推荐