Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat May 07, 2011 1:45 pm 
Offline
Senior Newbie

Joined: Wed Mar 09, 2011 4:40 pm
Posts: 18
Hi all,

I've got varnish in front of nginx and everything is working perfectly.
One problem - all IP's in my access logs are 127.0.0.1

I've configured varnish to pass the client IP via a http header:
Code:
sub vcl_recv {
  # Add a unique header containing the client address
  remove req.http.X-Forwarded-For;
  set    req.http.X-Forwarded-For = client.ip;

I see that nginx has a RealIP module but it's not enabled by default (crazy).
The problem I have is that I've installed nginx via apt-get rather than compiling from source.

Do I need to remove nginx and reinstall from source or is there a way to enable real ip from the apt-get packaged version?


Top
   
 Post subject:
PostPosted: Mon May 09, 2011 3:18 am 
Offline
Senior Member
User avatar

Joined: Sun Mar 23, 2008 10:10 am
Posts: 71
Website: http://attilab.com/
If the module is missing from the package, you will not be able to use it without recompiling or installing from a different source.

For Ubuntu, you can give the 'official' nginx PPA a try: https://launchpad.net/~nginx/+archive/stable

the nginx-full and nginx-extras packages include the RealIP module. I'd rather evaluate this PPA's packages instead of compiling from source, esp. if you don't have any specific needs.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group