Apache2 与ServerAlias匹配的特定子域的设置和环境变量

Apache2 与ServerAlias匹配的特定子域的设置和环境变量,apache2,dns,virtualhost,apache,Apache2,Dns,Virtualhost,Apache,我有一个包含以下设置的虚拟主机 ServerName www.host.com ServerAlias *.host.com 我可以设定吗 SetEnv FOO "bar" 对于特定子域(如foo.host.com)?答案是setenif指令: SetEnvIf Host .*foo\.host\.com FOO=bar

我有一个包含以下设置的虚拟主机

ServerName www.host.com
ServerAlias *.host.com
我可以设定吗

SetEnv FOO "bar"

对于特定子域(如
foo.host.com
)?

答案是
setenif
指令:

SetEnvIf Host .*foo\.host\.com FOO=bar