-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mod_remoteip doesn't add RemoteIpHeader in vhost #2456
Comments
I wouldn't expect a module to modify a vhost. Instead it deploys a mod config, which sets a default. Isn't that enough? If not, I'd think that |
I know, that the mod config is written, but in my testing it wasn't applied. Also it set After changing it to the real loadbalancer IP it still didn't work, only after turning off the puppet agent and manually adding the vhost option it was running again and the server was receiving real IP adresses $ cat /etc/apache2/mods-available/remoteip.conf
# Declare the header field which should be parsed for useragent IP addresses
RemoteIPHeader X-Forwarded-For
# Declare client intranet IP addresses trusted to present
# the RemoteIPHeader value
RemoteIPInternalProxy 127.0.0.1 |
I tested this on a smaller test system and it seems to work there BUT I didn't use puppet and set it up manually without the vhost variable So the real issue is: Puppet is setting RemoteIPInternalProxy to 127.0.0.1 while the documentation says the default value is undef. |
That would be here. I agree it's a confusing way. Prior to 4e4bad0 it was clearer. I don't understand why it was implemented this way. |
Looks like before the change introduced, the |
Previously the reference documentation did specify it, because it was a default. Now it's using a very obscure way to set a default. And I sort of get it: it's |
I opened #2512 to remove the deprecated parameters and properly make it clear that |
Describe the Bug
When using apache::mod::remote_ip the vhost doesn't get edited and the keywords aren't added. Therefore the remoteip isn't working, because the X-Forwarded-For header isn't set if apache get's used by a loadbalancer
Expected Behavior
I expect the
RemoteIPHeader X-Forwarded-For
to be set in the vhost if the module is usedSteps to Reproduce
Steps to reproduce the behavior:
Environment
Additional Context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: