Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to forward client IP via HAProxy #833

Unanswered
steveharman asked this question in Self-Hosted Support
Discussion options

Hi,

This isn't strictly a Plausible question, but as it's a vital step in making Plausible useful in its self-hosted form, I wondered if anyone had an example of the config for HAProxy > nginx which forwards the client IP to my web server when they hit HAProxy (so Plausible & geo-ip can work with it.

I've tried variations around the following, but my server only ever sees the HAProxy private-IP:

# HTTPS Frontend
frontend https-in
 bind *:443 ssl crt /etc/letsencrypt/live/pem/
 option forwardfor header X-Real-IP
 http-request set-header X-Real-IP %[src]

Thanks

You must be logged in to vote

Replies: 2 comments

Comment options

I know this is old, but i just had this issue with missing geodata in plausible using HAProxy. All i needed was option forwardfor inside frontend https-in, nothing else :)

You must be logged in to vote
0 replies
Comment options

Tacking on some more info for others that might search this - for HAProxy on pfsense.

On each Backend - under Advanced Settings - Backend passthrough - add option forwardfor

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /