Can I use If condition against custom header name that my request is passing in Apache 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are using Apache 2.4.12, I’m working to set a host in header based on header value passed in my request, was wondering if I can use IF statement to get the same, Request hitting my Apache server is having a header with header name “X-Proxy” and header value is Set to “Torbit”.

 

When this request with that header name hits my Apache I need to perform below action. Else it should not.

 

RequestHeader set Host cert-one.domain.com

 

I’m trying to do this in my virtualhost section as below.

 

<If "%{HTTP:X-Proxy} in { 'Torbit }">

               RequestHeader set Host cert-one.domain.com

</If>

 

This gives me below error while starting.

 

\n AH00526: Syntax error on line 8 of /u/applic/tc/HTTP/config/vhosts-ssl/wr-cleartrust/benefits-stage.wal-mart.com-vhost.conf:

Cannot parse condition clause: Unterminated string or variable \n

 

Any help will be appreciated.

 

Naveen Reddy

 

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux