# Server

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

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

---

## [Really simple IMAP Proxy](https://www.ruby-forum.com/t/really-simple-imap-proxy/214436)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [December 5, 2011, 8:24pm UTC](https://www.ruby-forum.com/t/really-simple-imap-proxy/214436 "2011-12-05T20:24:42Z")

</div>

I’m sure this has been asked before, but I Googled the list archives and only came up with some old stuff that involved a patch. I’d like to use Nginx as an IMAP proxy between the internet and an Exchange 2000 server,…

---

## [The best configuration for serving static content](https://www.ruby-forum.com/t/the-best-configuration-for-serving-static-content/214543)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [December 5, 2011, 6:23pm UTC](https://www.ruby-forum.com/t/the-best-configuration-for-serving-static-content/214543 "2011-12-05T18:23:54Z")

</div>

I want to create a config for domains serving static content. I made the following conf file. Is it the best possible code? (I just kept php interpretation for possible usage) location ~\* ^.+.(jpg|jpeg|gif|png|ico|cs…

---

## [Nginx cache grouped by keys](https://www.ruby-forum.com/t/nginx-cache-grouped-by-keys/214547)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [December 5, 2011, 3:57pm UTC](https://www.ruby-forum.com/t/nginx-cache-grouped-by-keys/214547 "2011-12-05T15:57:40Z")

</div>

Hi, I work for a company which uses a lot the proxy module and the proxy cache feature. We always have problems on clearing the cache because it has to be done url by url. Thinking in a way to solve this I made th…

---

## [Disable HEAD + Good config for large files?](https://www.ruby-forum.com/t/disable-head-good-config-for-large-files/214546)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [December 5, 2011, 1:40pm UTC](https://www.ruby-forum.com/t/disable-head-good-config-for-large-files/214546 "2011-12-05T13:40:03Z")

</div>

Hi everyone! Over the past weeks I read a lot on your pages and blogs on the net but I still have some questions left that seem to be unanswered until now. My site is acting like some kind of proxy and transfers big f…

---

## [Simple arithmetics in nginx config](https://www.ruby-forum.com/t/simple-arithmetics-in-nginx-config/214308)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [December 5, 2011, 11:28am UTC](https://www.ruby-forum.com/t/simple-arithmetics-in-nginx-config/214308 "2011-12-05T11:28:07Z")

</div>

Hello! I have an image folder called “i” in site’s root folder, it has many subfolders like 0, 100, 200, 300 … 600000, etc… So in folder “200” there are images from 200.jpg to 299.jpg, in folder “300” there are 300.jp…

---

## [Priority of cache-control, expires, x-accel-expires](https://www.ruby-forum.com/t/priority-of-cache-control-expires-x-accel-expires/214490)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [December 5, 2011, 10:30am UTC](https://www.ruby-forum.com/t/priority-of-cache-control-expires-x-accel-expires/214490 "2011-12-05T10:30:32Z")

</div>

How does nginx caching handle multiple cache control headers sent from a backend? I had a situation where I was sending both expires and cache-control and it seemed that the order in which they were sent controlled. …

---

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

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [December 5, 2011, 8:01am UTC](https://www.ruby-forum.com/t/location-header-rewrite/214521 "2011-12-05T08:01:20Z")

</div>

How do I go about rewriting the Location header in a response? I have setup nginx as a reverse proxy to a web mail server. Everything run good if data is self contain on that server. When an email have links to diff…

---

## [Real IP not working?](https://www.ruby-forum.com/t/real-ip-not-working/214519)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [December 4, 2011, 9:09pm UTC](https://www.ruby-forum.com/t/real-ip-not-working/214519 "2011-12-04T21:09:13Z")

</div>

Hi. Nginx 1.0.8 proxying to Apache 2. My version of PHP is 5.3.8, but that’s irrelevant I suppose. Nginx is with Real IP module. I have the following in my conf file: set\_real\_ip\_from 192.168.1.0/24; set\_real\_ip\_fro…

---

## [Nginx+Php-fpm Dangerous Bug](https://www.ruby-forum.com/t/nginx-php-fpm-dangerous-bug/214494)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 15\
**Last updated:** [December 3, 2011, 4:38pm UTC](https://www.ruby-forum.com/t/nginx-php-fpm-dangerous-bug/214494 "2011-12-03T16:38:16Z")

</div>

This is very dangerous Remote File Inclusion Bug in Nginx+php-fpm The Nginx+php-fpm shows dangerous bug because its allowed the PhpShell hidden in Image to Running, if you have php script like this: \<?php $rfi =…

---

## [How to use C as a scripting language?](https://www.ruby-forum.com/t/how-to-use-c-as-a-scripting-language/214491)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 8\
**Last updated:** [December 3, 2011, 3:57pm UTC](https://www.ruby-forum.com/t/how-to-use-c-as-a-scripting-language/214491 "2011-12-03T15:57:30Z")

</div>

I am using php in nginx. I wonder how can I modify nginx configuration to work with C too. Considered a simple c file (hello.c and compiled as a.out) with printf of printf(“Content-type: text/html\\r\\nStatus: 200 OK\\r\\…

---

## [Help! Nginx Vulnerable Remote file inclusion](https://www.ruby-forum.com/t/help-nginx-vulnerable-remote-file-inclusion/214489)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 6\
**Last updated:** [December 3, 2011, 6:51am UTC](https://www.ruby-forum.com/t/help-nginx-vulnerable-remote-file-inclusion/214489 "2011-12-03T06:51:05Z")

</div>

I really need help here :frowning: my forum got hacked 3 times, and i detected the hacker use RFI(Remote file inclusion) after i found an avatar image contain Phpshell code inside it. and the weird thing is when i tri…

---

## [Allow CNAME records to connect to point to my server?](https://www.ruby-forum.com/t/allow-cname-records-to-connect-to-point-to-my-server/214455)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [December 3, 2011, 2:37am UTC](https://www.ruby-forum.com/t/allow-cname-records-to-connect-to-point-to-my-server/214455 "2011-12-03T02:37:25Z")

</div>

Our web app gives each user a sub-domain. I’d like to offer some larger plans CNAME’s so they can point one of their own domain names with a CNAME to their sub-domain on our server ie; username.ourwebapp.com customer…

---

## [Strange "long polling" problem](https://www.ruby-forum.com/t/strange-long-polling-problem/214442)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [December 2, 2011, 11:49pm UTC](https://www.ruby-forum.com/t/strange-long-polling-problem/214442 "2011-12-02T23:49:17Z")

</div>

Hi All, I am having a problem with my Chatroom, that uses the long polling module linked with nginx version 1.0.6 First the structure. There are two http conversations going on with each client. GETs, created by “on…

---

## [Hi, i have a question, Im currently got a caching system in place but it use php to utilize it](https://www.ruby-forum.com/t/hi-i-have-a-question-im-currently-got-a-caching-system-in-place-but-it-use-php-to-utilize-it/214170)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [December 2, 2011, 11:33pm UTC](https://www.ruby-forum.com/t/hi-i-have-a-question-im-currently-got-a-caching-system-in-place-but-it-use-php-to-utilize-it/214170 "2011-12-02T23:33:50Z")

</div>

Im currently got a caching system in place but it use php to utilize it, is their some way to direct a user to html cache file ie www.domain.com/view.php?id={id} would hidden redirect to: www.domain.com/cache/{id}.ht…

---

## [Setting document root with module](https://www.ruby-forum.com/t/setting-document-root-with-module/214484)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [December 2, 2011, 11:06pm UTC](https://www.ruby-forum.com/t/setting-document-root-with-module/214484 "2011-12-02T23:06:01Z")

</div>

Hi, I’m investigating the prospects of setting $document\_root based of a value sitting in a text file. Not believing that I could just have the configuration file read from a .txt, my initial thought was to create a …

---

## [Gitweb](https://www.ruby-forum.com/t/gitweb/214471)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [December 2, 2011, 10:30pm UTC](https://www.ruby-forum.com/t/gitweb/214471 "2011-12-02T22:30:13Z")

</div>

Hy, I am having a hard time getting cgi (gitweb) to work. That’s the relefvant part of my config: location ~ /git(/.\*) { include /etc/nginx/fastcgi\_params; fastcgi\_pass unix:/var/run/fcgiwrap.socket; fastcgi\_in…

---

## [Nginx-1.1.10](https://www.ruby-forum.com/t/nginx-1-1-10/214374)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 8\
**Last updated:** [December 2, 2011, 10:06pm UTC](https://www.ruby-forum.com/t/nginx-1-1-10/214374 "2011-12-02T22:06:37Z")

</div>

Changes with nginx 1.1.10 30 Nov 2011 \*) Bugfix: a segmentation fault occured in a worker process if AIO was used on Linux; the bug had appeared in 1.1.9. Maxim D.

---

## [Dealing with buffered data with upstream generated response](https://www.ruby-forum.com/t/dealing-with-buffered-data-with-upstream-generated-response/214321)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [December 2, 2011, 5:13pm UTC](https://www.ruby-forum.com/t/dealing-with-buffered-data-with-upstream-generated-response/214321 "2011-12-02T17:13:14Z")

</div>

I am developing a body filter which transforms outgoing stream. As part of the function, the incoming stream is copied in new buffer and sent. This in some cases results in a condition where my filter has busy buffers…

---

## [Legacy versions prior to 0.5](https://www.ruby-forum.com/t/legacy-versions-prior-to-0-5/214470)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [December 2, 2011, 3:45pm UTC](https://www.ruby-forum.com/t/legacy-versions-prior-to-0-5/214470 "2011-12-02T15:45:14Z")

</div>

I’ve tried most of lightweight web servers, and nginx is truly amazing and my beloved webserver. Thus, I decided to profoundly study nginx to better understand it. The oldest version available for download is 0.5 I wo…

---

## [Tengine, a customized Nginx, goes to open source](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 7\
**Last updated:** [December 2, 2011, 3:41pm UTC](https://www.ruby-forum.com/t/tengine-a-customized-nginx-goes-to-open-source/214459 "2011-12-02T15:41:30Z")

</div>

Hi guys, We’re glad to announce that Tengine (http://tengine.taobao.org), our home-baked Nginx at Taobao now becomes an open source project. Taobao (http://www.taobao.com) is the largest e-commerce website in Asia an…

---

## [X-Accel-Redirect and "access forbidden by rule"](https://www.ruby-forum.com/t/x-accel-redirect-and-access-forbidden-by-rule/214472)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [December 2, 2011, 2:56pm UTC](https://www.ruby-forum.com/t/x-accel-redirect-and-access-forbidden-by-rule/214472 "2011-12-02T14:56:17Z")

</div>

I’m having an issue with turning on support for the X-Accel-Redirect header in DokuWiki, a php-based wiki application. The server in question is an Ubuntu 11.10 box with Nginx 1.0.10 and PHP-FPM 5.3.6-13. I posted a r…

---

## [Does this configuration have impact in performance?](https://www.ruby-forum.com/t/does-this-configuration-have-impact-in-performance/214457)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [December 2, 2011, 11:25am UTC](https://www.ruby-forum.com/t/does-this-configuration-have-impact-in-performance/214457 "2011-12-02T11:25:23Z")

</div>

Hello, I have two small bits in my configuration that I’m worried about. One it to redirect users based in their country to a specific page. The other is to choose the upstream based in a cookie. 'm am worried about …

---

## [Missing directives in English docs](https://www.ruby-forum.com/t/missing-directives-in-english-docs/214453)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [December 2, 2011, 10:32am UTC](https://www.ruby-forum.com/t/missing-directives-in-english-docs/214453 "2011-12-02T10:32:40Z")

</div>

Just noticed that the “merge\_slashes” core directive according to the Russian docs is not present in the English docs. I notice that there are always links to “original documentation” in the english language section. …

---

## [Can subrequest be used in log phase](https://www.ruby-forum.com/t/can-subrequest-be-used-in-log-phase/214454)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [December 2, 2011, 9:20am UTC](https://www.ruby-forum.com/t/can-subrequest-be-used-in-log-phase/214454 "2011-12-02T09:20:49Z")

</div>

Hi, I want to know whether subrequest can be used in log phase. I want to store some info in redis only for the requests with response code of 200. I’m planning to develop a c module which work in log phase . Thank…

---

## [Compile ngx\_resty to statically link some libs?](https://www.ruby-forum.com/t/compile-ngx-resty-to-statically-link-some-libs/213879)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 7\
**Last updated:** [December 2, 2011, 2:45am UTC](https://www.ruby-forum.com/t/compile-ngx-resty-to-statically-link-some-libs/213879 "2011-12-02T02:45:32Z")

</div>

Hey agentzh, could you provide tips on how I could cut down this list of dynamically linked libs: \[david@dev-3 ngx\_openresty-1.0.8.26\]$ ldd /usr/local/encap/nginx-resty-1.0.8.26/nginx/sbin/nginx linux-vdso.so.1 =\> (…

---

## [Nginx DSO(dynamic loadable module)](https://www.ruby-forum.com/t/nginx-dso-dynamic-loadable-module/214369)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [December 1, 2011, 12:29pm UTC](https://www.ruby-forum.com/t/nginx-dso-dynamic-loadable-module/214369 "2011-12-01T12:29:04Z")

</div>

Hello, I wrote nginx dso module and tested GNU/Linux i386/x86\_64. Also this module working independent from main unit, but It need slightly modification of the nginx build script. Can you review and apply patches? …

---

## [Proxy\_cache regexp batch purge modules 0.2](https://www.ruby-forum.com/t/proxy-cache-regexp-batch-purge-modules-0-2/213958)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [November 30, 2011, 9:58pm UTC](https://www.ruby-forum.com/t/proxy-cache-regexp-batch-purge-modules-0-2/213958 "2011-11-30T21:58:43Z")

</div>

Download http://m-b.cc/share/ngx\_batch\_purge-0.2.tar.gz About nginx\_cache\_batchpurge is ‘nginx’ module which adds regex batch purge content from ‘proxy’ caches, and is base on ngx\_cache\_purge. Notice This module i…

---

## [Premature failover to backup upstream](https://www.ruby-forum.com/t/premature-failover-to-backup-upstream/214366)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [November 30, 2011, 8:04pm UTC](https://www.ruby-forum.com/t/premature-failover-to-backup-upstream/214366 "2011-11-30T20:04:24Z")

</div>

Hello! I am using Nginx 1.0.5 to reverse proxy to a pool of three upstreams. One of them is configured as a backup upstream. From time to time, very rarely, a request will be proxied to the backup upstream when it sh…

---

## [Capture rewrite for every after question mark](https://www.ruby-forum.com/t/capture-rewrite-for-every-after-question-mark/214384)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [November 30, 2011, 7:13pm UTC](https://www.ruby-forum.com/t/capture-rewrite-for-every-after-question-mark/214384 "2011-11-30T19:13:04Z")

</div>

Hello, I have found the following while searching it is the only one i can get working with my config setup to send a 301 permanently if “/index.php” is directly accessed. if ($request\_uri ~\* ^(/home(/index)?|/index(…

---

## [Proxy\_cache/story and busylocks workaround](https://www.ruby-forum.com/t/proxy-cache-story-and-busylocks-workaround/214373)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [November 30, 2011, 11:56am UTC](https://www.ruby-forum.com/t/proxy-cache-story-and-busylocks-workaround/214373 "2011-11-30T11:56:00Z")

</div>

proxy\_cache workaround: http{ proxy\_cache\_path /cache keys\_zone=localcache:10m; limit\_zone perUri $uri 10m; } server { location /remote/ { try\_files $uri @fake @proxy-remote; } location @fake { root /notexists; …

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

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