REMOTE_ADDR in Apache Proxy Examples

Hi,

I have a working instance of bitwardenrs using Docker and Apache as a reverse proxy. I took the Apache configuration directly from your examples, just changing the necessary bits. Everything is working fine so far.

However I recently notice that the config says:
RequestHeader set X-Real-IP %{REMOTE_ADDR}s

There are two Apache examples with the same line with an “s” after the curly brackets. Is that “s” right? I’m not an Apache expert but never saw something similar nor have I found a reference in the documentation.

Thanks!!

https://httpd.apache.org/docs/2.4/en/mod/mod_headers.html#header

Good question. Spent some time but finally found it.

Just want to say that the Apache httpd doc is very difficult to read…

I am not using Apache though, according to what I’ve read, it’s also possible to use expr=%{REMOTE_ADDR}

https://httpd.apache.org/docs/2.4/en/expr.html#vars

%{REMOTE_ADDR}s may also works because:

https://httpd.apache.org/docs/2.4/en/mod/mod_ssl.html#envvars

I’ll be damned!! TIL! Thanks

I’ve figured that it should be OK since it was working fine and X-Real-IP seems to be important but couldn’t find the documentation in Apache site. You’re right. It is kind of difficult to find.

Thanks again!!