Reputation: 21
On a test server, we use wildcards in the ServerAlias
for dynamically generated sub domains.
Issue is i need to set a required custom environment called APP_HOME
to be identical to the document_root
.
<VirtualHost *:443>
ServerName testserver.com
ServerAlias *.testserver.com
VirtualDocumentRoot = /var/www/branch/%1/
SetEnv APP_HOME = /var/www/branch/%1/
</VirtualHost>
The expected result is for APP_HOME
and DOCUMENT_ROOT
to be the same, but currently
DOCUMENT_ROOT becomes /var/www/branch/testbranch/
and
APP_HOME becomes /var/www/branch/%1/
Upvotes: 1
Views: 206
Reputation: 21
This was never really resolved.
In the end we analysed the codebase and found that the custom enviroment variable was not needed and blanket replaced it with DOCUMENT_ROOT
One caveat was needing to ensure DOCUMENT_ROOT was set / passed in for cronjobs or cli operations.
Upvotes: 1