apache配置一个域名读取多个路径代码(包括主干和分支)

时间:2021-08-27 23:22:23

<VirtualHost *:80>
ServerAdmin 651629095@qq.com
DocumentRoot "C:/wamp/www/sms/trunk/public"//项目路径
ServerName trunk.sms.dev.购买的域名
ServerAlias sms.sms.dev.购买的域名
setenv APPLICATION_ENV dev
AddDefaultCharset UTF-8
</VirtualHost>

<VirtualHost *:80>
ServerAdmin 651629095@qq.com
ServerAlias *.sms.dev.购买的域名
setenv APPLICATION_ENV dev
AddDefaultCharset UTF-8
UseCanonicalName Off
VirtualDocumentRoot "C:/wamp/www/sms/%1/%2/public"
</VirtualHost>