-
Notifications
You must be signed in to change notification settings - Fork 160
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
Wrong IP addresses when using reverse proxy #70
Comments
Yes, I ran into this and fixed it years ago. Can you check if your Nginx is setting X-Forwarded-For correctly? I haven't tried it in a while, so perhaps there's a regression. (It's also mentioned in the list of gotchas. But that should only be for people using Arc 3.1 or the stable branch.) |
It looks like I hadn't set it correctly. I have this (and can't remember where I got it from),
Someone is suggesting this,
But in the Could you be a bit more specific on how to set the |
I don't have my old code handy.. ah, fortunately I open sourced it at some point! https://github.com/akkartik/readwarp/blob/master/scripts/Nginx.conf This worked for me back in 2010. |
Actually, some of the older log entries show the correct IP,
I know for sure that both Also, |
Yes, that did the trick! I'll put an basic Nginx config with this (and Lets Encrypt certs config) in this repo to make it more convenient for others. Thanks! |
When running
news.arc
behind a Nginx reverse proxy,news.arc
thinks that every request is coming from127.0.0.1
. This may be more of an Nginx bug, but since a reverse proxy is needed for HTTPS, it should apply to any production instance ofnews.arc
.Example from my
anarki/www/logs/news-2017-**-**
,This may not be a big issue, but it could break the IP blocking used against spam. It would be good to include a well-working Nginx configuration file in this repository, if anyone has one that works.
The text was updated successfully, but these errors were encountered: