https://bz.apache.org/bugzilla/show_bug.cgi?id=61518
Bug ID: 61518
Summary: environment variables set or changed in virtual hosts
are not available in .htaccess
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: mod_setenvif
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
In a firewalled environment it is often necessary to configure your firewall to
terminate SSL and to proxy via http to the internal server.
To ensure the creation of valid links it is necessary to fool the running
software on the internal server that it is on ssl. thus links etc are created
correctly.
To enable the process it is common for there to be a config line in your
virtual server like the following
# reverse proxy server that sets the "X-Forwarded-Proto https" flag
SetEnvIfNoCase X-Forwarded-Proto https HTTPS=on
Unfortunately it appears that the the environment variable set in the virtual
host is not honoured in the .htaccess processing stage.
Therefore as an example this snippet of code fails
# if you enable "www." stripping or enforcement, in order to ensure that
# you don't bounce between http and https.
RewriteRule ^ - [E=protossl]
RewriteCond %{HTTPS} on
RewriteRule ^ - [E=protossl:s]
The above code is taken from a Drupal 8 .htaccess file
I would expect that any environment variables set or replaced in the virtual
server section of the config to precede the .htaccess processing and therefore
the modified contents of the env be available.
This does not appear to be happening.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]