# Server

**URL:** https://www.ruby-forum.com/c/server/33.md?page=305

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 306

---

## [Forward requests by IP](https://www.ruby-forum.com/t/forward-requests-by-ip/170279)

<div class="topic-metadata">

**Author:** [@michal\_krajcirovic](https://www.ruby-forum.com/u/michal_krajcirovic)\
**Replies:** 2\
**Last updated:** [June 15, 2009, 1:11pm UTC](https://www.ruby-forum.com/t/forward-requests-by-ip/170279 "2009-06-15T13:11:22Z")

</div>

Hello, trying to resolve some relatively simple problem. We have a webserver, it works NGINX. All the requirements that come with either sent from this site, or (as have the flv and mp4) to send to another server and …

---

## [400 bad request](https://www.ruby-forum.com/t/400-bad-request/169917)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 14\
**Last updated:** [June 14, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/400-bad-request/169917 "2009-06-14T18:25:19Z")

</div>

this is nginx 0.6.34. We run some fairly high volume facebook sites and have had problems with 400 errors now for months. It only happens on one part of our site that runs inside an iframe. At first I thought it wa…

---

## [Worker\_connections is not enough while connecting to upstream](https://www.ruby-forum.com/t/worker-connections-is-not-enough-while-connecting-to-upstream/141306)

<div class="topic-metadata">

**Author:** [@alanwatts](https://www.ruby-forum.com/u/alanwatts)\
**Replies:** 3\
**Last updated:** [June 14, 2009, 12:20pm UTC](https://www.ruby-forum.com/t/worker-connections-is-not-enough-while-connecting-to-upstream/141306 "2009-06-14T12:20:49Z")

</div>

we are getting a ton of these in our error.log 1024 worker\_connections is not enough while connecting to upstream what is this a sign of?

---

## [Proxy (nginx-\>nginx) issue](https://www.ruby-forum.com/t/proxy-nginx-nginx-issue/170207)

<div class="topic-metadata">

**Author:** [@cliffwiggs](https://www.ruby-forum.com/u/cliffwiggs)\
**Replies:** 1\
**Last updated:** [June 14, 2009, 1:32am UTC](https://www.ruby-forum.com/t/proxy-nginx-nginx-issue/170207 "2009-06-14T01:32:13Z")

</div>

Hi, I’m migrating an old shared hosting box into a VPS and I was hoping to migrate one site at a time by just proxying from the old server to the new one (both servers running Nginx): hosting (1.2.3.4): server { se…

---

## [Correct usage of location context?](https://www.ruby-forum.com/t/correct-usage-of-location-context/170131)

<div class="topic-metadata">

**Author:** [@Szymon\_Polom](https://www.ruby-forum.com/u/Szymon_Polom)\
**Replies:** 14\
**Last updated:** [June 13, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/correct-usage-of-location-context/170131 "2009-06-13T17:26:10Z")

</div>

I’m trying to shift my nginx instance from a multi-subdomain-setting to a one-domain-setting. I have the following config in the same server context: location /redmine/ { root /var/www/redmine/public; passenger\_enab…

---

## [502 from upstream not handled by nginx error\_page](https://www.ruby-forum.com/t/502-from-upstream-not-handled-by-nginx-error-page/170150)

<div class="topic-metadata">

**Author:** [@JamesHarrison](https://www.ruby-forum.com/u/JamesHarrison)\
**Replies:** 2\
**Last updated:** [June 13, 2009, 4:35pm UTC](https://www.ruby-forum.com/t/502-from-upstream-not-handled-by-nginx-error-page/170150 "2009-06-13T16:35:11Z")

</div>

Hi, I’m having issues serving up a custom 502 using upstream; essentially nginx’s 502 is always shown, despite having a custom 502 page set up with error\_page. The configuration is here: http://pastie.org/private/8k…

---

## [Upload file to PHP (Socket FastCGI) behind reserve proxy issue](https://www.ruby-forum.com/t/upload-file-to-php-socket-fastcgi-behind-reserve-proxy-issue/170174)

<div class="topic-metadata">

**Author:** [@hshh](https://www.ruby-forum.com/u/hshh)\
**Replies:** 0\
**Last updated:** [June 13, 2009, 7:36am UTC](https://www.ruby-forum.com/t/upload-file-to-php-socket-fastcgi-behind-reserve-proxy-issue/170174 "2009-06-13T07:36:25Z")

</div>

Hi, I just found an interesting bug about file upload to php behind reserve proxy, and only effect by using socket mode. Short describe about environment, Client \<–\> NAT \<–\> Nginx Reserve Proxy (A) \<–\> Nginx Web (B1)…

---

## [Rewrite rule to send all static content to CDN?](https://www.ruby-forum.com/t/rewrite-rule-to-send-all-static-content-to-cdn/170161)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 1\
**Last updated:** [June 13, 2009, 7:14am UTC](https://www.ruby-forum.com/t/rewrite-rule-to-send-all-static-content-to-cdn/170161 "2009-06-13T07:14:10Z")

</div>

With Apache we can do this using: RewriteCond %{HTTP\_USER\_AGENT} !^CDN\_USER\_AGENT$ \[NC\] RewriteRule .\*.(jpg|gif|png|flv|css|js|swf)$ http://cdn-domain-name/$0 \[R=301,L\] But we want our CDN to serve our static con…

---

## [X-Accel-Redirect, action after download and where nginx uploading tmp files?](https://www.ruby-forum.com/t/x-accel-redirect-action-after-download-and-where-nginx-uploading-tmp-files/170165)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 13, 2009, 2:55am UTC](https://www.ruby-forum.com/t/x-accel-redirect-action-after-download-and-where-nginx-uploading-tmp-files/170165 "2009-06-13T02:55:19Z")

</div>

I need to know two things: is possible, if I use X-Accel-Redirect for file downloads, to execute some php script after file downloaded? I need this to count real file downloads… I still need to test nginx but bef…

---

## [Limit Request Body Size (Disallow very large File-uploads)](https://www.ruby-forum.com/t/limit-request-body-size-disallow-very-large-file-uploads/170122)

<div class="topic-metadata">

**Author:** [@gollomm](https://www.ruby-forum.com/u/gollomm)\
**Replies:** 5\
**Last updated:** [June 12, 2009, 7:38pm UTC](https://www.ruby-forum.com/t/limit-request-body-size-disallow-very-large-file-uploads/170122 "2009-06-12T19:38:26Z")

</div>

Hello all, For the last couple of days I was trying to get my Apache/mod\_proxy/mongrel setup to limit the size of the request body. The setup is as follows: 1.) Apache acts as a reverse proxy by facilitating mod\_rewr…

---

## [Problem in $remote\_addr when proxying](https://www.ruby-forum.com/t/problem-in-remote-addr-when-proxying/168231)

<div class="topic-metadata">

**Author:** [@Tyler\_Durden](https://www.ruby-forum.com/u/Tyler_Durden)\
**Replies:** 3\
**Last updated:** [June 12, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/problem-in-remote-addr-when-proxying/168231 "2009-06-12T13:44:55Z")

</div>

Hi, I have nginx as frontend for serving static files and a proxy to apache for dinamic request. The problem is on the $remote\_addr that arrive to apache as 127.0.0.1 In my virtualhost: upstream my\_webcluster { ser…

---

## [Question about proxy\_buffers](https://www.ruby-forum.com/t/question-about-proxy-buffers/169864)

<div class="topic-metadata">

**Author:** [@JSSSSrSSSSme\_Loyet](https://www.ruby-forum.com/u/JSSSSrSSSSme_Loyet)\
**Replies:** 9\
**Last updated:** [June 12, 2009, 12:32pm UTC](https://www.ruby-forum.com/t/question-about-proxy-buffers/169864 "2009-06-12T12:32:45Z")

</div>

Hi all, I’m not sure how proxy\_buffers are used. 1- requests to the backend can use only one buffer. If the reponse is bigger than one buffer, some part of the response is buffered to disk. 2- requests to the backen …

---

## [Protect link with cookies?](https://www.ruby-forum.com/t/protect-link-with-cookies/169839)

<div class="topic-metadata">

**Author:** [@Artifex\_Maximus](https://www.ruby-forum.com/u/Artifex_Maximus)\
**Replies:** 7\
**Last updated:** [June 12, 2009, 11:46am UTC](https://www.ruby-forum.com/t/protect-link-with-cookies/169839 "2009-06-12T11:46:18Z")

</div>

Hello! I am pretty newbie to nginx and having problem on protecting my links. I am using valid\_referers but is it possible using cookies for make it stronger? For example I set cookie uid with nginx’s userid in ‘loca…

---

## [About get etag from r-\>upstream.headers\_in-\>etag](https://www.ruby-forum.com/t/about-get-etag-from-r-upstream-headers-in-etag/169939)

<div class="topic-metadata">

**Author:** [@bit\_bull](https://www.ruby-forum.com/u/bit_bull)\
**Replies:** 1\
**Last updated:** [June 12, 2009, 5:06am UTC](https://www.ruby-forum.com/t/about-get-etag-from-r-upstream-headers-in-etag/169939 "2009-06-12T05:06:24Z")

</div>

hi, all: sorry for my pool english. I write a filter, it need get etag(http header) from proxied server. But I cant get etag in r-\>upstream.headers\_in-\>etag, so I added "#if (NGX\_HTTP\_MYMODULE) { ngx\_string(“ETag…

---

## [How do you add a custom header with the value set to current time in msec?](https://www.ruby-forum.com/t/how-do-you-add-a-custom-header-with-the-value-set-to-current-time-in-msec/169973)

<div class="topic-metadata">

**Author:** [@yfinkelstein](https://www.ruby-forum.com/u/yfinkelstein)\
**Replies:** 2\
**Last updated:** [June 12, 2009, 12:35am UTC](https://www.ruby-forum.com/t/how-do-you-add-a-custom-header-with-the-value-set-to-current-time-in-msec/169973 "2009-06-12T00:35:28Z")

</div>

Hi, I want to insert a custom HTTP header with the value set to the current timestamp in msec. Is it possible to accomplish this without using perl module? Is there a bult-in variable $current\_time or something like …

---

## [Mongrel crashing problem](https://www.ruby-forum.com/t/mongrel-crashing-problem/170063)

<div class="topic-metadata">

**Author:** [@Nicholas\_J\_Kreucher](https://www.ruby-forum.com/u/Nicholas_J_Kreucher)\
**Replies:** 1\
**Last updated:** [June 11, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/mongrel-crashing-problem/170063 "2009-06-11T23:35:08Z")

</div>

Hi Everyone, Wondering if anyone has insight into my mongrel crashing problem before I dig deeper with gdb etc. Most of the crashes seem to be in connection\_pool.rb (see below). I’ve got 4 of them running and a mongre…

---

## [New patch: upstream consist hash patch](https://www.ruby-forum.com/t/new-patch-upstream-consist-hash-patch/170023)

<div class="topic-metadata">

**Author:** [@i\_amok\_i\_amok](https://www.ruby-forum.com/u/i_amok_i_amok)\
**Replies:** 2\
**Last updated:** [June 11, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/new-patch-upstream-consist-hash-patch/170023 "2009-06-11T17:05:57Z")

</div>

hi,all i has patch the upstream hash module to support consist hash. below is patch file and patch method. http://upstream-consist-hash.googlecode.com/files/upstream\_hash.path http://upstream-consist-hash.googlecod…

---

## [Proxy\_ignore\_headers when not using cache](https://www.ruby-forum.com/t/proxy-ignore-headers-when-not-using-cache/170038)

<div class="topic-metadata">

**Author:** [@JSSSSrSSSSme\_Loyet](https://www.ruby-forum.com/u/JSSSSrSSSSme_Loyet)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 4:14pm UTC](https://www.ruby-forum.com/t/proxy-ignore-headers-when-not-using-cache/170038 "2009-06-11T16:14:14Z")

</div>

Hi igor, how the directive proxy\_ignore\_headers is used when the cache is not set for a location ? for exemple: http { … proxy\_cache\_path /LIBRE/nginx/cache levels=1:2 keys\_zone=one:32m inactive=1d max\_size=4g; pr…

---

## [Load Balancer / Nginx response times](https://www.ruby-forum.com/t/load-balancer-nginx-response-times/170034)

<div class="topic-metadata">

**Author:** [@Asif\_A](https://www.ruby-forum.com/u/Asif_A)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/load-balancer-nginx-response-times/170034 "2009-06-11T15:23:40Z")

</div>

Ezra, I am testing a new APP with EY Load balancer + ngnix + mongrel handler This app gives me a throughput of 20 per second without nginx but when I run the same application with several mongrel ports say 25 and ng…

---

## ["fallback" response code](https://www.ruby-forum.com/t/fallback-response-code/169820)

<div class="topic-metadata">

**Author:** [@phillipoertel](https://www.ruby-forum.com/u/phillipoertel)\
**Replies:** 4\
**Last updated:** [June 11, 2009, 1:30pm UTC](https://www.ruby-forum.com/t/fallback-response-code/169820 "2009-06-11T13:30:54Z")

</div>

I’m using a custom perl script in the following way: location ~ ^/resources { error\_page 404 @fallback; } location @fallback { perl MyModule::handler; } The fallback works as expected, apart from that it always re…

---

## [Round robin upstream stuck](https://www.ruby-forum.com/t/round-robin-upstream-stuck/170021)

<div class="topic-metadata">

**Author:** [@ZhangSTony](https://www.ruby-forum.com/u/ZhangSTony)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 11:48am UTC](https://www.ruby-forum.com/t/round-robin-upstream-stuck/170021 "2009-06-11T11:48:37Z")

</div>

Hi I got some but not that much errer log in error.log like : round robin upstream stuck on 1 tries while connecting to upstream, client: xxxx , server: xxxx, request: "GET xxxxâ€ I tuned log level to crit…

---

## [Mongrel crashes while running 'exec' through ruby](https://www.ruby-forum.com/t/mongrel-crashes-while-running-exec-through-ruby/196969)

<div class="topic-metadata">

**Author:** [@tahir\_rauf](https://www.ruby-forum.com/u/tahir_rauf)\
**Replies:** 2\
**Last updated:** [June 11, 2009, 11:48am UTC](https://www.ruby-forum.com/t/mongrel-crashes-while-running-exec-through-ruby/196969 "2009-06-11T11:48:30Z")

</div>

Hi All, I have a ruby on rails application and in the controller, I try to run a shell script using exec command like this variable = ‘sh /home/abc.sh’ exec variable But when the control comes at this line, the mon…

---

## [Stop nginx from caching asset](https://www.ruby-forum.com/t/stop-nginx-from-caching-asset/169965)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 4\
**Last updated:** [June 11, 2009, 8:23am UTC](https://www.ruby-forum.com/t/stop-nginx-from-caching-asset/169965 "2009-06-11T08:23:53Z")

</div>

Hi, This is driving me nuts. I am updating some js and css files and in my browser I am still seeing the old files, how can I force my browser or Nginx to send the new ones? Thanks.

---

## [Non-Cache Handling for Bots](https://www.ruby-forum.com/t/non-cache-handling-for-bots/169990)

<div class="topic-metadata">

**Author:** [@mperham](https://www.ruby-forum.com/u/mperham)\
**Replies:** 4\
**Last updated:** [June 11, 2009, 4:45am UTC](https://www.ruby-forum.com/t/non-cache-handling-for-bots/169990 "2009-06-11T04:45:12Z")

</div>

Hello, when a bot visits our page, we want to create a response that is different than the response for a human. In particular we want to limit the hierarchies of menus so that the bot doesnt think there are too may …

---

## [X-Accel-Redirect with proxy\_pass](https://www.ruby-forum.com/t/x-accel-redirect-with-proxy-pass/169999)

<div class="topic-metadata">

**Author:** [@Chris\_Bolt](https://www.ruby-forum.com/u/Chris_Bolt)\
**Replies:** 0\
**Last updated:** [June 11, 2009, 4:17am UTC](https://www.ruby-forum.com/t/x-accel-redirect-with-proxy-pass/169999 "2009-06-11T04:17:09Z")

</div>

I’m having trouble with a problem that someone appears to have had trouble with in the past: http://thread.gmane.org/gmane.comp.web.nginx.english/6619 I’d like a script to return a proxied file, and for nginx to handl…

---

## [Does any module support the heathy check of the backend upstreams?](https://www.ruby-forum.com/t/does-any-module-support-the-heathy-check-of-the-backend-upstreams/169196)

<div class="topic-metadata">

**Author:** [@Chieu](https://www.ruby-forum.com/u/Chieu)\
**Replies:** 9\
**Last updated:** [June 11, 2009, 12:04am UTC](https://www.ruby-forum.com/t/does-any-module-support-the-heathy-check-of-the-backend-upstreams/169196 "2009-06-11T00:04:54Z")

</div>

hi, I want to implement a module that can check the heathy of the backend web servers circlely. If the upstream died, the module can remove the server from the upstream list and if the upstream get up, the module can…

---

## [Max\_clients and keep alive](https://www.ruby-forum.com/t/max-clients-and-keep-alive/168192)

<div class="topic-metadata">

**Author:** [@Tristan\_Griffiths](https://www.ruby-forum.com/u/Tristan_Griffiths)\
**Replies:** 4\
**Last updated:** [June 10, 2009, 11:19pm UTC](https://www.ruby-forum.com/t/max-clients-and-keep-alive/168192 "2009-06-10T23:19:10Z")

</div>

Hello, Trying to better understand the worker\_processes and worker\_connections settings. We have always run Nginx with worker\_processes 4 and worker\_connections 1024 on a dual Xeon 2.4GHz with Hyper Threading. In the…

---

## [Tomcat cluster behind nginx: avoiding delays while restarting tomcat](https://www.ruby-forum.com/t/tomcat-cluster-behind-nginx-avoiding-delays-while-restarting-tomcat/168907)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [June 10, 2009, 7:50pm UTC](https://www.ruby-forum.com/t/tomcat-cluster-behind-nginx-avoiding-delays-while-restarting-tomcat/168907 "2009-06-10T19:50:52Z")

</div>

We run a tomcat cluster behind nginx with the upstream module. Nginx fits our requirements well for load balancing and failover, except for in one case. When starting or restarting tomcat, our web application takes a…

---

## [Question about proxy cache when it expires](https://www.ruby-forum.com/t/question-about-proxy-cache-when-it-expires/167758)

<div class="topic-metadata">

**Author:** [@JSSSSrSSSSme\_Loyet](https://www.ruby-forum.com/u/JSSSSrSSSSme_Loyet)\
**Replies:** 14\
**Last updated:** [June 10, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/question-about-proxy-cache-when-it-expires/167758 "2009-06-10T19:29:46Z")

</div>

Hello igor, I have a question about the cache behaviour in proxy mode. I have nginx in front head which redirect to an apache back end. Nginx caches eveything for M minutes. If I have a large number of requests for t…

---

## [$upstream\_cache\_status](https://www.ruby-forum.com/t/upstream-cache-status/169948)

<div class="topic-metadata">

**Author:** [@imixaly4](https://www.ruby-forum.com/u/imixaly4)\
**Replies:** 2\
**Last updated:** [June 10, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/upstream-cache-status/169948 "2009-06-10T18:42:15Z")

</div>

The patch to enable $upstream\_cache\_status. Possible values: MISS EXPIRED expired, request was passed to backend UPDATING expired, stale response was used due to proxy/fastcgi\_cache\_use\_stale updating STALE expi…

[Previous page](https://www.ruby-forum.com/c/server/33.md?page=304)

[Next page](https://www.ruby-forum.com/c/server/33.md?page=306)
