# Server

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

[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:** 143

---

## [Help needed with spdy](https://www.ruby-forum.com/t/help-needed-with-spdy/221675)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [July 25, 2012, 10:04pm UTC](https://www.ruby-forum.com/t/help-needed-with-spdy/221675 "2012-07-25T22:04:02Z")

</div>

Hi, I’m usually compiling nginx from source (currently using 1.3.3). As I’ve read that spdy success story yesterday I thought I’d try that myself. So I got 1.3.3 again patched it using spdy.patch-47.txt, downloaded O…

---

## [Nginx spdy server hint](https://www.ruby-forum.com/t/nginx-spdy-server-hint/221663)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 9\
**Last updated:** [July 25, 2012, 9:41pm UTC](https://www.ruby-forum.com/t/nginx-spdy-server-hint/221663 "2012-07-25T21:41:15Z")

</div>

Does Nginx support SPDY server hint ? I have built nginx-1.3.3 with patch.spdy-47.txt and openssl-1.0.1c and my test client is Chrome 22.0 (beta unstable). I know SPDY server push is not supported, but is SPDY server …

---

## [Whitelisting IP addresses for ratelimiting](https://www.ruby-forum.com/t/whitelisting-ip-addresses-for-ratelimiting/221678)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [July 25, 2012, 4:00pm UTC](https://www.ruby-forum.com/t/whitelisting-ip-addresses-for-ratelimiting/221678 "2012-07-25T16:00:36Z")

</div>

I have my configuration set up based on the information at as follows: http { … geo $unlimited { default 1; 192.168.45.56/32 0; } … limit\_req\_zone $binary\_remote\_addr zone=unlimited:10m rate=10r/m; … serv…

---

## [Proxy\_cache\_use\_stale, updating question](https://www.ruby-forum.com/t/proxy-cache-use-stale-updating-question/177978)

<div class="topic-metadata">

**Author:** [@Tomasz\_P](https://www.ruby-forum.com/u/Tomasz_P)\
**Replies:** 9\
**Last updated:** [July 25, 2012, 4:25am UTC](https://www.ruby-forum.com/t/proxy-cache-use-stale-updating-question/177978 "2012-07-25T04:25:11Z")

</div>

Hello, If I understand the code correctly, when I don’t have the cache file, request is going directly to upstream, so when I have 100 request at the time when I don’t have the cache file yet, all those requests wil…

---

## [Not all locations considered](https://www.ruby-forum.com/t/not-all-locations-considered/221635)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [July 24, 2012, 2:05pm UTC](https://www.ruby-forum.com/t/not-all-locations-considered/221635 "2012-07-24T14:05:58Z")

</div>

Hi All, For a web application we have developed we wanted to use nginx as a reverse proxy but I have some trouble/weird issues when setting it up. Itseemds that part of my configuration is ignored, it appears it has t…

---

## [Perl\_modules](https://www.ruby-forum.com/t/perl-modules/221649)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [July 24, 2012, 1:01pm UTC](https://www.ruby-forum.com/t/perl-modules/221649 "2012-07-24T13:01:04Z")

</div>

I compiled nginx with perl ( --with-http\_perl\_module ), … checking for perl perl version: v5.8.8 built for i386-linux-thread-multi perl interpreter multiplicity found … installed it , and then i get \[root@host ngi…

---

## [PHP-FPM "upstream sent too big header."](https://www.ruby-forum.com/t/php-fpm-upstream-sent-too-big-header/226373)

<div class="topic-metadata">

**Author:** [@HTF](https://www.ruby-forum.com/u/HTF)\
**Replies:** 0\
**Last updated:** [July 24, 2012, 12:02pm UTC](https://www.ruby-forum.com/t/php-fpm-upstream-sent-too-big-header/226373 "2012-07-24T12:02:03Z")

</div>

Hi, I’ve noticed the following error message in the logs: “2012/07/24 11:26:19 \[error\] 18623#0: \*521909 upstream sent too big header while reading response header from upstream, client…” I’ve read the documentation a…

---

## [Return 400 for invalid $uri and $args](https://www.ruby-forum.com/t/return-400-for-invalid-uri-and-args/226372)

<div class="topic-metadata">

**Author:** [@Edho\_A](https://www.ruby-forum.com/u/Edho_A)\
**Replies:** 0\
**Last updated:** [July 24, 2012, 8:50am UTC](https://www.ruby-forum.com/t/return-400-for-invalid-uri-and-args/226372 "2012-07-24T08:50:58Z")

</div>

Is there a way to check $uri and $args for invalid percent-encoded utf8 string and return 400?

---

## [Nginx 502 bad gateway every few seconds](https://www.ruby-forum.com/t/nginx-502-bad-gateway-every-few-seconds/221632)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [July 23, 2012, 10:27pm UTC](https://www.ruby-forum.com/t/nginx-502-bad-gateway-every-few-seconds/221632 "2012-07-23T22:27:57Z")

</div>

Hi Could someone help me i get the 502 bad gateway every few seconds The server is running on vps on debian with quadcore and 3g ram here is the kind of error i can in the nginx log : 2012/07/23 15:06:53 \[error\] 2908…

---

## [Nginx caching but shouldn't be](https://www.ruby-forum.com/t/nginx-caching-but-shouldnt-be/221641)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [July 23, 2012, 6:56pm UTC](https://www.ruby-forum.com/t/nginx-caching-but-shouldnt-be/221641 "2012-07-23T18:56:57Z")

</div>

We have nginx running, and for reasons I don’t understand, it seems to be caching content to /var/lib/nginx/proxy. I can’t even find this setting in the configuration anywhere, i.e. the following returns nothing: roo…

---

## [Listing current requests? Is there a module for it?](https://www.ruby-forum.com/t/listing-current-requests-is-there-a-module-for-it/221634)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [July 23, 2012, 4:37pm UTC](https://www.ruby-forum.com/t/listing-current-requests-is-there-a-module-for-it/221634 "2012-07-23T16:37:46Z")

</div>

Hi, one last thing we would like to solve before moving from Lighttpd to Nginx + php-fpm is an equivalent of mod\_status module that would be able to live list current requests like this: There were times that a liv…

---

## [Nginx rewrite stikked](https://www.ruby-forum.com/t/nginx-rewrite-stikked/221633)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [July 23, 2012, 4:23pm UTC](https://www.ruby-forum.com/t/nginx-rewrite-stikked/221633 "2012-07-23T16:23:44Z")

</div>

Hi, I’m installing stikked (a pastebin web server) on my server. I’m having trouble, I want to rewrite all url like this : http://pastebin.okira.net/index.php/lists like that : http://pastebin.okira.net/index.php?lis…

---

## [X-Accel-Redirect in LUA?](https://www.ruby-forum.com/t/x-accel-redirect-in-lua/221621)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [July 23, 2012, 10:15am UTC](https://www.ruby-forum.com/t/x-accel-redirect-in-lua/221621 "2012-07-23T10:15:28Z")

</div>

Hi Is it possible to trigger an X-Accel-Redirect from within lua code? Example: location / { lua code should trigger X-Accel-Redirect to either location1 or location2? Somehow?? access\_by\_lua\_file /home/nginx/conf…

---

## [Exception for NGINX limit\_req\_zone](https://www.ruby-forum.com/t/exception-for-nginx-limit-req-zone/221591)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 7\
**Last updated:** [July 22, 2012, 8:36pm UTC](https://www.ruby-forum.com/t/exception-for-nginx-limit-req-zone/221591 "2012-07-22T20:36:07Z")

</div>

I got a problem with NGINX limit\_req\_zone. Anyone can help? The problem is that, I want to limit user access to some specific URL, for example: /forum.php?mod=forumdisplay? /forum.php?mod=viewthread&\*\*\* But, I do wan…

---

## [Cache by mime type](https://www.ruby-forum.com/t/cache-by-mime-type/221590)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 11\
**Last updated:** [July 22, 2012, 8:12pm UTC](https://www.ruby-forum.com/t/cache-by-mime-type/221590 "2012-07-22T20:12:45Z")

</div>

Like the title says, can I cache images (or whatever) by mime type, not extension? The only relevant info I found is at However, the suggested config is not valid, because proxy directive cannot be used inside if. P…

---

## [How to define a struct that only need one time initialization and used for every request](https://www.ruby-forum.com/t/how-to-define-a-struct-that-only-need-one-time-initialization-and-used-for-every-request/226369)

<div class="topic-metadata">

**Author:** [@Walter\_Chang](https://www.ruby-forum.com/u/Walter_Chang)\
**Replies:** 0\
**Last updated:** [July 22, 2012, 12:37am UTC](https://www.ruby-forum.com/t/how-to-define-a-struct-that-only-need-one-time-initialization-and-used-for-every-request/226369 "2012-07-22T00:37:57Z")

</div>

Hi , I’m new to server development. I have a c++ struct that need to be initialized once from file and it will be used in each request since the data it has is read only. I’m not sure what’s the best practice to def…

---

## [Set error\_page follow reverse proxy kind](https://www.ruby-forum.com/t/set-error-page-follow-reverse-proxy-kind/221549)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [July 21, 2012, 11:14am UTC](https://www.ruby-forum.com/t/set-error-page-follow-reverse-proxy-kind/221549 "2012-07-21T11:14:10Z")

</div>

Hi everyone, My Nginx server is Reverse Proxy and other Apache is web server 192.168.1.10 (nginx) ----\> 192.168.1.20 (apache) How can I config error\_page when nginx configurated like as Reverse Proxy? And below my co…

---

## [Location header subsitution](https://www.ruby-forum.com/t/location-header-subsitution/221589)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [July 20, 2012, 5:22pm UTC](https://www.ruby-forum.com/t/location-header-subsitution/221589 "2012-07-20T17:22:04Z")

</div>

Hello, i tried to build content adaption with nginx. For example requesting http://example.com.reverseproxy.com will serve you content from example.com with substituted url from http://example.com to http://example.c…

---

## [Questions about limit\_req\_zone, what's the difference between rate= and burst=](https://www.ruby-forum.com/t/questions-about-limit-req-zone-whats-the-difference-between-rate-and-burst/221553)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [July 20, 2012, 11:57am UTC](https://www.ruby-forum.com/t/questions-about-limit-req-zone-whats-the-difference-between-rate-and-burst/221553 "2012-07-20T11:57:40Z")

</div>

Hi All, According to NGINX wiki, limit\_req\_zone $binary\_remote\_addr zone=one:10m rate=1r/s; server { location /search/ { limit\_req zone=one burst=5; } means allows a user no more than 1 reques…

---

## [Weird apache status values with nginx](https://www.ruby-forum.com/t/weird-apache-status-values-with-nginx/221510)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 4\
**Last updated:** [July 20, 2012, 11:51am UTC](https://www.ruby-forum.com/t/weird-apache-status-values-with-nginx/221510 "2012-07-20T11:51:14Z")

</div>

Hello. Since I have installed nginx on our dedicated server I’m having some odd issue. The “cpu usage” and “requests currently being processed” are not correct on apache-status A couple of image to see ir clearly. Im…

---

## [Help with wrong directive](https://www.ruby-forum.com/t/help-with-wrong-directive/221493)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [July 20, 2012, 11:04am UTC](https://www.ruby-forum.com/t/help-with-wrong-directive/221493 "2012-07-20T11:04:28Z")

</div>

Hello guys, I’ve got a problem with location directive. I set up a website tracker using awstats, but the icon is not loaded. For example, the image URL are like this http://www.domain.com/awstatsicon/other/vu.jpg A…

---

## [MP4 - start time is out mp4 stts samples](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [July 20, 2012, 10:44am UTC](https://www.ruby-forum.com/t/mp4-start-time-is-out-mp4-stts-samples/221449 "2012-07-20T10:44:36Z")

</div>

Hello, i get the following errors: 2012/07/15 22:58:44 \[info\] 30717#0: \*1 client prematurely closed connection while sending mp4 to client, client: 127.0.0.158, server: xxx.com, request: “GET /mp4/mp4/vs-xxx.720p.mp4…

---

## [Flash Video In Drupal](https://www.ruby-forum.com/t/flash-video-in-drupal/226350)

<div class="topic-metadata">

**Author:** [@shikha](https://www.ruby-forum.com/u/shikha)\
**Replies:** 2\
**Last updated:** [July 20, 2012, 9:26am UTC](https://www.ruby-forum.com/t/flash-video-in-drupal/226350 "2012-07-20T09:26:16Z")

</div>

hey sir/mam, I am new to drupal7 and i have been asked to include a f lash video in the website which i am making can anyone please tell me the whole procedure in detail as i won’t be able to understand in short.The f…

---

## [Disable Caching](https://www.ruby-forum.com/t/disable-caching/226343)

<div class="topic-metadata">

**Author:** [@dgarstang](https://www.ruby-forum.com/u/dgarstang)\
**Replies:** 1\
**Last updated:** [July 19, 2012, 7:19pm UTC](https://www.ruby-forum.com/t/disable-caching/226343 "2012-07-19T19:19:32Z")

</div>

All, I have an nginx config that looks like this… user www-data; worker\_processes 4; pid /var/run/nginx.pid; events { worker\_connections 768; multi\_accept on; } http { sendfile on; tcp\_nopush on; tcp\_nodelay …

---

## [Add\_headers on text/html only?](https://www.ruby-forum.com/t/add-headers-on-text-html-only/221520)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [July 19, 2012, 5:55pm UTC](https://www.ruby-forum.com/t/add-headers-on-text-html-only/221520 "2012-07-19T17:55:22Z")

</div>

I’m trying to add three headers for security to all text/html content: add\_header X-Content-Type-Options ‘nosniff’; add\_header X-Frame-Options ‘DENY’; add\_header X-XSS-Protection ‘1; mode=block’; I’d like to add thes…

---

## [Help about limit\_req](https://www.ruby-forum.com/t/help-about-limit-req/221522)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 6\
**Last updated:** [July 19, 2012, 5:05pm UTC](https://www.ruby-forum.com/t/help-about-limit-req/221522 "2012-07-19T17:05:41Z")

</div>

Hi All, In the pass several days my server was under attack. Someone are using WebBench to test my website, and it takes up all my server CPU resources. So I’m wondering to use limit\_req to limit the request frequen…

---

## [Problem with rewrite or internal redirection cycle](https://www.ruby-forum.com/t/problem-with-rewrite-or-internal-redirection-cycle/221531)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [July 19, 2012, 4:28pm UTC](https://www.ruby-forum.com/t/problem-with-rewrite-or-internal-redirection-cycle/221531 "2012-07-19T16:28:51Z")

</div>

Hello I have recently moved my website from Litespeed to nginx. I had to change some lines in my PHP script to use x-sendfile function and because of it I also had to change my nginx config. Unfortunately, when I’m e…

---

## [Nginx installtion issue](https://www.ruby-forum.com/t/nginx-installtion-issue/221547)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [July 19, 2012, 2:54pm UTC](https://www.ruby-forum.com/t/nginx-installtion-issue/221547 "2012-07-19T14:54:12Z")

</div>

Hello, While installing nginx I am facing the following issue make make -f objs/Makefile make\[1\]: Entering directory \`/tmp/root-passenger-17381/nginx-0.8.53’ gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-para…

---

## [Another c file](https://www.ruby-forum.com/t/another-c-file/221537)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [July 19, 2012, 2:40pm UTC](https://www.ruby-forum.com/t/another-c-file/221537 "2012-07-19T14:40:10Z")

</div>

My module uses external c file. How can I link it with ngx? thanks Posted at Nginx Forum:

---

## [How to fix the rewrite rule?](https://www.ruby-forum.com/t/how-to-fix-the-rewrite-rule/221556)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [July 19, 2012, 11:13am UTC](https://www.ruby-forum.com/t/how-to-fix-the-rewrite-rule/221556 "2012-07-19T11:13:48Z")

</div>

this works fine rewrite “^/(\[a-f0-9\]{2})(\[a-f0-9\]{18}).(jpg|png|gif)$” /test.php?a=$1&b=$2&c=$3 last; open /a669164f02f6fdc18f.jpg test.php would output Array ( \[a\] =\> ad \[b\] =\> a669164f02f6fdc18f \[c\] =\> jpg ) but …

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

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