Hi everyone, I'm setting up a load balancer with 2 backend servers using the following configuration: upstream backend{ ip_hash; server 10.0.0.1:3000 max_fails=3 fail_timeout=20s; server 10.0.0.2:3000 max_fails=3 fail_timeout=20s; } location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Fby ehudros2 - Nginx Mailing List - English
Hmmm... Is there any chance that such functionality will ever make it into production?by ehudros2 - Nginx Mailing List - English
I've dug a bit deeper into the documentation and it seems like proxy_no_cache and proxy_cache_bypass should somehow do the trick, but I can get things to work with my exact scenario. Here's the flow I'd like to create: 1. when a new user reaches the site, it is forwarded to the backend and receives a few cookies back. A "new user" is identified by a lack of a certain cookie, which isby ehudros2 - Nginx Mailing List - English
Hi everyone, I'm looking into setting up nginx as a proxy cache. I was wondering if someone can elaborate a bit about ways to bypass the cache in certain requests. For example, I'd like every new user to go to the backend server once in order for some cookies to be written. On further requests I'd like to serve the user with a cached copy of the site. How can I set a mechanism that bypasses thby ehudros2 - Nginx Mailing List - English
Hi Troy, Thanks for your response. It does change when running ab, giving a smaller total time for the page load, but I'm not sure if and how I can break ab's total request time further. Is there a way to make is show the different phases of the page loading (waiting for response, downloading etc.)? Also, on the same machine running Firebug I get much lower "waiting for response" valby ehudros2 - Nginx Mailing List - English
Thanks Igor, your help on this issue so far is outstanding. I'll give it a try and post my results.by ehudros2 - Nginx Mailing List - English
slight bump ;) Can a perl monk help here?by ehudros2 - Nginx Mailing List - English
Hi every, I'm back :) It seems I need the header to be set in a different format, and look like an expires date. it currently gives: User-Expires Mon Apr 12 03:52:54 2010 When the desired outcome should be: Mon, 12 Apr 2010 03:52:54 GMT Is there a way I can format the date to the expires date format? I'm guessing it should be done in the perl function you suggested, but I have no knowleby ehudros2 - Nginx Mailing List - English
Hallelujah! I finally got it to work with you great help. Thanks :) BTW - it was not perl_var but perl_set that did the trick, if anyone needs something like this in the future.by ehudros2 - Nginx Mailing List - English
Of course. Here is my configure command: ./configure --sbin-path=/usr/sbin --with-http_ssl_module --conf-path=/etc/nginx --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_perl_module --prefix=/etc/nginx I've noticed the "checking for perl" line this time (really don't know how I've missed it last time), and here's the printout: checkingby ehudros2 - Nginx Mailing List - English
Guys, I really feel bad about bumping a second time in 2 days, but I'm being hammered here for not getting this done ;) Can someone please throw in his thoughts on why I can't get the perl module installed? Thanks!by ehudros2 - Nginx Mailing List - English
(bump)by ehudros2 - Nginx Mailing List - English
Hi guys, seems like ./configure does not check for perl (I dont see that line and ./configure | grep perl also comes back empty). So does "grep lperl objs/Makefile". Any idea why that is? I'm really thankful for all your help ;)by ehudros2 - Nginx Mailing List - English
Thanks for the help guys... Here's my configure line: ./configure --sbin-path=/usr/sbin --with-http_ssl_module --conf-path=/etc/nginx --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_perl_module --prefix=/etc/nginx I get a ton of "undefined reference" errors when it tries to compile the perl module (like "undefined reference to `pby ehudros2 - Nginx Mailing List - English
anyone? I'm getting lost with this perl module stuff here ;) is it already in the nginx apt packed I installed? if it is, why is perl_var unidentified?by ehudros2 - Nginx Mailing List - English
Looks awesome, but seems like I dont have the perl module installed? I get a "unknown directive "perl_var" error... I've tried searching for the perl module but it seems like the docs are in russian. Is there a way I can compile it into ngnix?by ehudros2 - Nginx Mailing List - English
So there is no way I can calculate a time string in runtime unless I'm using expire?by ehudros2 - Nginx Mailing List - English
How can I set that header to 30 days from now, as I do with expires 30d? Thanks a lot! :)by ehudros2 - Nginx Mailing List - English
OMG, add_header... That's what's i've been looking for the entire morning. I've tried so many different searches on how to add custom headers - they've all lead me to the proxy_pass_header. Thanks ;)by ehudros2 - Nginx Mailing List - English
Hi all, I'm trying something that I though should be quite simple but turns out it isn't... I have a rails app and want all static assets with a timestamp query string to be sent with a custom response header called "User-Expires", instead of the regular "expires" directive. I'm coming from apache, and I'm not sure if proxy_set_header is what I'm looking for or not. In anyby ehudros2 - Nginx Mailing List - English
![]() |
![]() |
![]() |
![]() |
![]() |