httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Salim Abdul -X (salimabd - HCL TECHNOLOGIES LIMITED at Cisco)" <>
Subject [users@httpd] Apache 2.4.41 checking env variable error
Date Sun, 03 Nov 2019 17:24:22 GMT
Hi Apache experts,

We are in the process of upgrading apache for linux from 2.2 to 2.4.41.
We have a SSLRequire access control directive in the httpd configuration file as below
<Directory />
    Options FollowSymLinks
    AllowOverride None
    SSLRequire %{XYZ} == "SUCCESS" || %{REQUEST_URI} == "/xyz/register/register.rq"

The above works fine with 2.2. After upgrade to 2.4, getting error message "SSLRequire: Variable
'XYZ' does not exist"
As SSLRequire is deprecated in 2.4, I have replaced "SSLRequire" with "Require" as below.
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require env XYZ || (expr %{REQUEST_URI} == "/xyz/register/register.rq")

The above works. But the "env" allows to check the existence of environment variable, it does
not support checking the value.
What is the syntax to check the value of environment variable in "Require".

Thanks in advance,


View raw message