标签: nginx nginx-config
在Nginx服务器配置中需要环境变量条件。位置指令本身可以工作,但是对环境变量进行任何测试都会导致无效条件。
# Proxy files to live site if ($LIVE_DOMAIN != '') { location ~ ^/sites/default/files/(.*)$ { proxy_pass https://$LIVE_DOMAIN/sites/default/files/$1; } }