# Server

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

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

---

## [Slides for my Nginx/OpenResty talk given at the Tech-Club Salon](https://www.ruby-forum.com/t/slides-for-my-nginx-openresty-talk-given-at-the-tech-club-salon/217332)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [February 28, 2012, 10:05am UTC](https://www.ruby-forum.com/t/slides-for-my-nginx-openresty-talk-given-at-the-tech-club-salon/217332 "2012-02-28T10:05:11Z")

</div>

Hello, folks! I gave an Nginx/OpenResty talk at the Tech-Club Salon held in the beautiful city, Xiamen, in southern China. Here’s the slides that I used for my presentation: http://agentzh.org/misc/slides/ngx-openre…

---

## [Error\_page directive, how does context affect error handling behavior?](https://www.ruby-forum.com/t/error-page-directive-how-does-context-affect-error-handling-behavior/217272)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [February 28, 2012, 10:03am UTC](https://www.ruby-forum.com/t/error-page-directive-how-does-context-affect-error-handling-behavior/217272 "2012-02-28T10:03:20Z")

</div>

Hello, I’m using nginx 1.1.14 on Debian Squeeze. In /etc/nginx.conf I wrote: error\_page 404 http://google.com; That error\_page directive is written in the http context. So far so good, when I visit http://mydomain.c…

---

## [Regular Expression global redirect](https://www.ruby-forum.com/t/regular-expression-global-redirect/217256)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 17\
**Last updated:** [February 28, 2012, 12:36am UTC](https://www.ruby-forum.com/t/regular-expression-global-redirect/217256 "2012-02-28T00:36:39Z")

</div>

I’m using nginx as a reverse proxy for about 2000 websites. I’m trying to find a good way to redirect all www traffic to nonwww addresses. I don’t want to have a separate entry for every domain…just a global redirect …

---

## [Undoing rewrite (for proxy\_pass)](https://www.ruby-forum.com/t/undoing-rewrite-for-proxy-pass/217305)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [February 27, 2012, 10:13pm UTC](https://www.ruby-forum.com/t/undoing-rewrite-for-proxy-pass/217305 "2012-02-27T22:13:49Z")

</div>

Hello, i recently tried to set up nginx as reverse-proxy in front of apache to offload serving of cached static versions of pages, where i needed to apply a rewrite to construct the local path of the cache files: r…

---

## [Problem with fpm php (wrong script location!)](https://www.ruby-forum.com/t/problem-with-fpm-php-wrong-script-location/217309)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [February 27, 2012, 9:26pm UTC](https://www.ruby-forum.com/t/problem-with-fpm-php-wrong-script-location/217309 "2012-02-27T21:26:37Z")

</div>

Hi, first of all: i am fairly new to nginx (used apache for several years now)… Works great, except fpm php… In the last 24h i have read many tutorials, forum posts and howtos… First there was no error message at al…

---

## [What is the reason ngx\_http\_fastcgi\_module doesn't support subrequest\_in\_memory flag?](https://www.ruby-forum.com/t/what-is-the-reason-ngx-http-fastcgi-module-doesnt-support-subrequest-in-memory-flag/217310)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [February 27, 2012, 9:04pm UTC](https://www.ruby-forum.com/t/what-is-the-reason-ngx-http-fastcgi-module-doesnt-support-subrequest-in-memory-flag/217310 "2012-02-27T21:04:15Z")

</div>

What is the reason ngx\_http\_fastcgi\_module doesn’t support subrequest\_in\_memory flag? What is the best way to do the same this for fastcgi? Set body filter and then empty buffers in incoming chains? Posted at Nginx Fo…

---

## [How to make a post subrequest with response body from parent?](https://www.ruby-forum.com/t/how-to-make-a-post-subrequest-with-response-body-from-parent/217252)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [February 27, 2012, 8:29pm UTC](https://www.ruby-forum.com/t/how-to-make-a-post-subrequest-with-response-body-from-parent/217252 "2012-02-27T20:29:59Z")

</div>

Hi, I want to make a post subrequest to fastcgi with parent’s response body to filter it there and return to client. I cannot find any manual about making a post subrequests. Can you share some basic code with explan…

---

## [Compilation error on CentOS-5.7](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 12\
**Last updated:** [February 27, 2012, 5:26pm UTC](https://www.ruby-forum.com/t/compilation-error-on-centos-5-7/217300 "2012-02-27T17:26:05Z")

</div>

Hi, Can you please help me overcome this problem. I’m trying to compile Nginx + nginx\_udplog\_module from source but I get this error: cc1: warnings being treated as errors I tried with nginx-1.0.0 the version in our…

---

## [Reverse proxy, subdomain](https://www.ruby-forum.com/t/reverse-proxy-subdomain/217289)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [February 27, 2012, 12:20pm UTC](https://www.ruby-forum.com/t/reverse-proxy-subdomain/217289 "2012-02-27T12:20:36Z")

</div>

Hi, Currently I have in operation a reverse proxy with nginx. All good. The problem is that now need to include in the configuration, the reverse proxy, a subdomain that points to another server. As I can do? You ha…

---

## [Easy way to log ssl client-certificate errors with nginx?](https://www.ruby-forum.com/t/easy-way-to-log-ssl-client-certificate-errors-with-nginx/217284)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [February 27, 2012, 7:23am UTC](https://www.ruby-forum.com/t/easy-way-to-log-ssl-client-certificate-errors-with-nginx/217284 "2012-02-27T07:23:42Z")

</div>

YTitle says it all. I’d like to have logs about rejected client-certificates (expiration / wrong site-name, etc) What would be the right way to get such log files

---

## [Custom 404 error\_page seems to conflict with access\_log off](https://www.ruby-forum.com/t/custom-404-error-page-seems-to-conflict-with-access-log-off/217274)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [February 26, 2012, 11:18pm UTC](https://www.ruby-forum.com/t/custom-404-error-page-seems-to-conflict-with-access-log-off/217274 "2012-02-26T23:18:04Z")

</div>

Hello, In my server block, I configured a custom 404 error page and I tried to disable access log for /favicon.ico error\_page 404 /404.html; location = /favicon.ico { access\_log off; } It seems that both conflic…

---

## [How to Cache dynamic content using Nginx when sessions are involved?How to Cache dynamic content usi](https://www.ruby-forum.com/t/how-to-cache-dynamic-content-using-nginx-when-sessions-are-involved-how-to-cache-dynamic-content-usi/217258)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [February 26, 2012, 3:24pm UTC](https://www.ruby-forum.com/t/how-to-cache-dynamic-content-using-nginx-when-sessions-are-involved-how-to-cache-dynamic-content-usi/217258 "2012-02-26T15:24:07Z")

</div>

This site explains how to create static files from dynamic content using Nginx. My question is this: can I achieve the same if login sessions are involved. ie. when I want to serve content to only registered users an…

---

## [How to merge subrequest header](https://www.ruby-forum.com/t/how-to-merge-subrequest-header/199579)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 7\
**Last updated:** [February 26, 2012, 1:03am UTC](https://www.ruby-forum.com/t/how-to-merge-subrequest-header/199579 "2012-02-26T01:03:04Z")

</div>

Hi,all. I use ngx\_http\_subrequest to send a subrequest with the parent’s response body,after the sub request processed, I got the subrequest’s body, but It seems has no way to merge the subrequest header to parent r…

---

## [Map FastCGI Ports Dynamically](https://www.ruby-forum.com/t/map-fastcgi-ports-dynamically/217125)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 11\
**Last updated:** [February 24, 2012, 4:54am UTC](https://www.ruby-forum.com/t/map-fastcgi-ports-dynamically/217125 "2012-02-24T04:54:22Z")

</div>

I have a config file that handles wildcard subdomains like: server\_name ~^(?.+).mydomain.com$; Then the variable $user contains the subdomain. The problem, is that I also need to dynamically set the port that fastcgi …

---

## [Can't run php in aliased directory outside the root directory](https://www.ruby-forum.com/t/cant-run-php-in-aliased-directory-outside-the-root-directory/217202)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [February 23, 2012, 11:38pm UTC](https://www.ruby-forum.com/t/cant-run-php-in-aliased-directory-outside-the-root-directory/217202 "2012-02-23T23:38:03Z")

</div>

A quick explanation as to what I’m trying to accomplish. We have a website where we want to keep a media folder outside the root. This holds all of our large images and videos and mp3 files. We don’t want to keep thi…

---

## [Rewriting uri as querystring using nginx?](https://www.ruby-forum.com/t/rewriting-uri-as-querystring-using-nginx/217172)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [February 23, 2012, 5:02pm UTC](https://www.ruby-forum.com/t/rewriting-uri-as-querystring-using-nginx/217172 "2012-02-23T17:02:57Z")

</div>

How do I rewrite URIs of the form http://domain1/one/two?three=four to http://domain2?path=http%3A%2F%2Fdomain1%2Fone%2Ftwo%3Fthree%3Dfour using nginx? Posted at Nginx Forum:

---

## [Is this thread bug?](https://www.ruby-forum.com/t/is-this-thread-bug/217130)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [February 23, 2012, 2:26am UTC](https://www.ruby-forum.com/t/is-this-thread-bug/217130 "2012-02-23T02:26:47Z")

</div>

hello,everyone: I have to use nginx’s muti-thread model. Presently, i am using and modifying it. But i have some problems about nginx’s thread processing: (1) in funcion “ngx\_worker\_thread\_cycle”, there is such codes …

---

## [Auth user with postgresql](https://www.ruby-forum.com/t/auth-user-with-postgresql/216947)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 22\
**Last updated:** [February 22, 2012, 11:33pm UTC](https://www.ruby-forum.com/t/auth-user-with-postgresql/216947 "2012-02-22T23:33:40Z")

</div>

Hi list I am a nginx newbie. Nginx does not ask user and password with the following configuration: … upstream database { postgres\_server 127.0.0.1 dbname=dbnginx user=nginx password=secret; } server { list…

---

## [Release Schedule](https://www.ruby-forum.com/t/release-schedule/217147)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [February 22, 2012, 7:49pm UTC](https://www.ruby-forum.com/t/release-schedule/217147 "2012-02-22T19:49:38Z")

</div>

I’ve become very interested in the 1.1 branch recently, particularly it’s http/1.1 support in proxy mode. Is there a rough timeline already proposed for the promotion of the 1.1 branch to ‘production’? – Will ‘Mit’…

---

## [Order of HTTP headers change cache behaviour](https://www.ruby-forum.com/t/order-of-http-headers-change-cache-behaviour/217146)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [February 22, 2012, 6:04pm UTC](https://www.ruby-forum.com/t/order-of-http-headers-change-cache-behaviour/217146 "2012-02-22T18:04:48Z")

</div>

Hello. Looking at my log I’ve noticed that some pages were not cached. After a bit of debugging I’ve noticed that the order in which the HTTP header are returned from Apache change how NGINX this save the page in the …

---

## [Processing Chunked request/response](https://www.ruby-forum.com/t/processing-chunked-request-response/217135)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [February 22, 2012, 10:25am UTC](https://www.ruby-forum.com/t/processing-chunked-request-response/217135 "2012-02-22T10:25:26Z")

</div>

Dear all, I heard that to process chunked request or response extra module or patch is necessary. I’ve met this log trying to upload a video file to nginx server: client sent “Transfer-Encoding: chunked” header while…

---

## [Php exits with 502 Bad Gateway](https://www.ruby-forum.com/t/php-exits-with-502-bad-gateway/217002)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 10\
**Last updated:** [February 22, 2012, 5:24am UTC](https://www.ruby-forum.com/t/php-exits-with-502-bad-gateway/217002 "2012-02-22T05:24:13Z")

</div>

Hello I have a problem where php exits with a 502 Bad Gateway error every once in a while. It appears to be unpredictable. When it happens I have to re-start the vm – restarting nginx doesn’t fix it. The OS is Ubun…

---

## [Proxy\_cache recursive update](https://www.ruby-forum.com/t/proxy-cache-recursive-update/217081)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [February 22, 2012, 4:52am UTC](https://www.ruby-forum.com/t/proxy-cache-recursive-update/217081 "2012-02-22T04:52:34Z")

</div>

Hi guys, I know that nginx proxy\_cache is based on url (page). The cache file is something like this : ./c/a00b4dce27af1b06075339f598a4050c and it includes all the content of that page : text, image, banner, … Suppo…

---

## [Weird caching behaviour](https://www.ruby-forum.com/t/weird-caching-behaviour/217097)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [February 21, 2012, 4:00pm UTC](https://www.ruby-forum.com/t/weird-caching-behaviour/217097 "2012-02-21T16:00:08Z")

</div>

Hi guys, we’re running a load balanced cluster with nginx as load balancing software and use the caching feature. So far we’re caching for 3 high frequent sites and it’s working great. Now when I add another site t…

---

## [Using tmpfs](https://www.ruby-forum.com/t/using-tmpfs/217088)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [February 21, 2012, 1:32pm UTC](https://www.ruby-forum.com/t/using-tmpfs/217088 "2012-02-21T13:32:49Z")

</div>

Performance wise, just hosting static files using tmpfs rather than ext4… would do alot? (cpu load/throughput etc) Is there any benefit in using a ramdisk as your wwwroot dir?

---

## [Is this a bug?](https://www.ruby-forum.com/t/is-this-a-bug/217071)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [February 21, 2012, 9:58am UTC](https://www.ruby-forum.com/t/is-this-a-bug/217071 "2012-02-21T09:58:08Z")

</div>

hello,everyone: I have the following questions about add\_header instruction.(version 1.1.8) This is my nginx.conf 43 add\_header Server ok; 44 location / { 45 add\_header location ok; …

---

## [Unable to configure nginx as reverse proxy](https://www.ruby-forum.com/t/unable-to-configure-nginx-as-reverse-proxy/216954)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [February 21, 2012, 8:54am UTC](https://www.ruby-forum.com/t/unable-to-configure-nginx-as-reverse-proxy/216954 "2012-02-21T08:54:56Z")

</div>

Hi I am new to nginx and am trying to configure nginx as reverse proxy. Its broadcasting on the ip but its not forwarding the requests to the backend servers and nothing found in logs as well. Please let me know wher…

---

## [Dynamic Subdomain Configuration](https://www.ruby-forum.com/t/dynamic-subdomain-configuration/217062)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 11\
**Last updated:** [February 21, 2012, 2:53am UTC](https://www.ruby-forum.com/t/dynamic-subdomain-configuration/217062 "2012-02-21T02:53:01Z")

</div>

Hello, We provide a subdomain for each user, for example: paul.ourdomain.com jay.ourdomain.com bob.ourdomain.com xxxxx.ourdomain.com Currently, I am doing this manually by adding another config in /etc/nginx/conf…

---

## [Nginx reverse proxy proxies subset of requests slowly](https://www.ruby-forum.com/t/nginx-reverse-proxy-proxies-subset-of-requests-slowly/217051)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 5\
**Last updated:** [February 20, 2012, 10:13pm UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-proxies-subset-of-requests-slowly/217051 "2012-02-20T22:13:21Z")

</div>

(This is cross-post from Server Fault: http://serverfault.com/questions/361742/nginx-reverse-proxy-proxies-subset-of-requests-slowly) We’re running an nginx reverse proxy in front of a couple of IIS 7.5 web servers. I…

---

## [Nginx ignores access\_log directive when post\_action specifie](https://www.ruby-forum.com/t/nginx-ignores-access-log-directive-when-post-action-specifie/189388)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 4\
**Last updated:** [February 20, 2012, 1:29pm UTC](https://www.ruby-forum.com/t/nginx-ignores-access-log-directive-when-post-action-specifie/189388 "2012-02-20T13:29:42Z")

</div>

Hi, in the location below nginx writes a custom download log. Everything works fine except when there is a post\_action directive. I seems that nginx skips the access\_log directive but I don’t understand why. Any help…

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

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