# Server

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

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

---

## [Handling nginx's too many open files even I have the correct ulimit](https://www.ruby-forum.com/t/handling-nginxs-too-many-open-files-even-i-have-the-correct-ulimit/225174)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [May 17, 2013, 2:46pm UTC](https://www.ruby-forum.com/t/handling-nginxs-too-many-open-files-even-i-have-the-correct-ulimit/225174 "2013-05-17T14:46:24Z")

</div>

Hi, On ubuntu, I tried su - www-data ulimit -Hn 200000 ulimit -Sn 100000 The value seems be fine as I have worker\_connections = 4000, and worker\_processes = 4, so total is 16000, and still within the limit. …

---

## [Bug?](https://www.ruby-forum.com/t/bug/229013)

<div class="topic-metadata">

**Author:** [@suttya](https://www.ruby-forum.com/u/suttya)\
**Replies:** 6\
**Last updated:** [May 16, 2013, 3:00pm UTC](https://www.ruby-forum.com/t/bug/229013 "2013-05-16T15:00:03Z")

</div>

Hy all! I have this error and i don’t know how to slove it. https://gist.github.com/Stageline/9a643fa13d040d49f1d1 Short details: I try request url with curl seems everithing OK, getting http 200 code, but if i try t…

---

## [Nginx + Mono (OpenBSD 5.3)](https://www.ruby-forum.com/t/nginx-mono-openbsd-5-3/229001)

<div class="topic-metadata">

**Author:** [@Gee](https://www.ruby-forum.com/u/Gee)\
**Replies:** 0\
**Last updated:** [May 15, 2013, 5:48pm UTC](https://www.ruby-forum.com/t/nginx-mono-openbsd-5-3/229001 "2013-05-15T17:48:44Z")

</div>

OK - I can confirm that nginx is in fact chroot(8) - After much playing around, I noticed a comment in the ports documentation that mentions this (I know, I know…) So to solve this particular problem, I just moved my…

---

## [Error\_page without content type](https://www.ruby-forum.com/t/error-page-without-content-type/228982)

<div class="topic-metadata">

**Author:** [@enduro](https://www.ruby-forum.com/u/enduro)\
**Replies:** 3\
**Last updated:** [May 15, 2013, 3:09pm UTC](https://www.ruby-forum.com/t/error-page-without-content-type/228982 "2013-05-15T15:09:09Z")

</div>

Hi I’m setting a custom 404 page with: server { … error\_page 404 /errors/not-found.html; } And the page looks as follows: \<link href=“/favicon.ico” rel=“shortcut icon” type=“image/vnd.microsoft.icon” /\> Seite …

---

## [Nginx giving 502 Bad Gateway in random intervals](https://www.ruby-forum.com/t/nginx-giving-502-bad-gateway-in-random-intervals/228967)

<div class="topic-metadata">

**Author:** [@darshan.choudhary](https://www.ruby-forum.com/u/darshan.choudhary)\
**Replies:** 12\
**Last updated:** [May 15, 2013, 11:52am UTC](https://www.ruby-forum.com/t/nginx-giving-502-bad-gateway-in-random-intervals/228967 "2013-05-15T11:52:17Z")

</div>

I am getting a 502 Bad Gateway on my server after any random intervals. If i run the following code the server starts working again: /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cg…

---

## [Can I cache a page conditionally based on cookie value?](https://www.ruby-forum.com/t/can-i-cache-a-page-conditionally-based-on-cookie-value/228989)

<div class="topic-metadata">

**Author:** [@patng323](https://www.ruby-forum.com/u/patng323)\
**Replies:** 2\
**Last updated:** [May 15, 2013, 11:18am UTC](https://www.ruby-forum.com/t/can-i-cache-a-page-conditionally-based-on-cookie-value/228989 "2013-05-15T11:18:59Z")

</div>

Hi, Using NginX as a reverse proxy, I want to cache the response ONLY if the user has NOT logged in, which can be checked by testing the existence of a cookie. First I tried to use “if”, but NginX complained that I …

---

## [Problem with fastcgi\_split\_path\_info on ubuntu precise](https://www.ruby-forum.com/t/problem-with-fastcgi-split-path-info-on-ubuntu-precise/228703)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 11\
**Last updated:** [May 14, 2013, 11:38pm UTC](https://www.ruby-forum.com/t/problem-with-fastcgi-split-path-info-on-ubuntu-precise/228703 "2013-05-14T23:38:34Z")

</div>

Hi, I must be missing something obvious here. I rerun my ubuntu configuration script and suddenly my nginx setup not working correctly anymore. Here my relevant nginx config: location ~ \[^/\]\\.php(/|$) { …

---

## [Debian package](https://www.ruby-forum.com/t/debian-package/228886)

<div class="topic-metadata">

**Author:** [@B.R](https://www.ruby-forum.com/u/B.R)\
**Replies:** 2\
**Last updated:** [May 14, 2013, 7:06pm UTC](https://www.ruby-forum.com/t/debian-package/228886 "2013-05-14T19:06:14Z")

</div>

Hello, Is Wheezy supported for Nginx? Would it be possible to use role-based package selection for the Nginx APT source? That means using: deb Index of /packages/debian/ stable nginx deb-src Index of /packages/deb…

---

## [Proxy doesn't cache](https://www.ruby-forum.com/t/proxy-doesnt-cache/228849)

<div class="topic-metadata">

**Author:** [@Stefan\_Xenon](https://www.ruby-forum.com/u/Stefan_Xenon)\
**Replies:** 2\
**Last updated:** [May 14, 2013, 2:52pm UTC](https://www.ruby-forum.com/t/proxy-doesnt-cache/228849 "2013-05-14T14:52:37Z")

</div>

Hi! I want to use nginx as a caching proxy in front of an OCSP responder. The OCSP requests are transmitted via HTTP POST. Hence, I configured nginx as follows: proxy\_cache\_path /tmp/nginx/cache levels=1:2 keys\_zone…

---

## [Nginx-1.2.9](https://www.ruby-forum.com/t/nginx-1-2-9/228925)

<div class="topic-metadata">

**Author:** [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Replies:** 1\
**Last updated:** [May 14, 2013, 11:59am UTC](https://www.ruby-forum.com/t/nginx-1-2-9/228925 "2013-05-14T11:59:41Z")

</div>

Changes with nginx 1.2.9 13 May 2013 \*) Security: contents of worker process memory might be sent to a client if HTTP backend returned specially crafted response (CVE-2013-20…

---

## [Tengine-1.4.6 (fixed CVE-2013-2070)](https://www.ruby-forum.com/t/tengine-1-4-6-fixed-cve-2013-2070/228961)

<div class="topic-metadata">

**Author:** [@yaoweibin](https://www.ruby-forum.com/u/yaoweibin)\
**Replies:** 0\
**Last updated:** [May 14, 2013, 11:40am UTC](https://www.ruby-forum.com/t/tengine-1-4-6-fixed-cve-2013-2070/228961 "2013-05-14T11:40:59Z")

</div>

Hi folks, Tengine-1.4.6 (development version) has been released. You can either checkout the source code from github: GitHub - alibaba/tengine: A distribution of Nginx with some advanced features or download the tar b…

---

## [Hey](https://www.ruby-forum.com/t/hey/228956)

<div class="topic-metadata">

**Author:** [@Matt\_Starcrest](https://www.ruby-forum.com/u/Matt_Starcrest)\
**Replies:** 0\
**Last updated:** [May 14, 2013, 10:50am UTC](https://www.ruby-forum.com/t/hey/228956 "2013-05-14T10:50:44Z")

</div>

http://texturepanel.com/news\_xml.php?xskqducca792zezkvdg matt.starcrest Matt Starcrest Hold on - wait, maybe the answer’s looking for you. %

---

## [Multiple site configuration](https://www.ruby-forum.com/t/multiple-site-configuration/228937)

<div class="topic-metadata">

**Author:** [@guillaumeserton](https://www.ruby-forum.com/u/guillaumeserton)\
**Replies:** 2\
**Last updated:** [May 13, 2013, 11:50pm UTC](https://www.ruby-forum.com/t/multiple-site-configuration/228937 "2013-05-13T23:50:52Z")

</div>

Hello, I would like to set nginx to use several website, and that they are reachable for some of them with a domain name or in localhost. Example: Site1: only accessible on localhost with 192.168.x.x/site1 (root: /v…

---

## [Async notification in Nginx](https://www.ruby-forum.com/t/async-notification-in-nginx/228883)

<div class="topic-metadata">

**Author:** [@Alder\_N](https://www.ruby-forum.com/u/Alder_N)\
**Replies:** 1\
**Last updated:** [May 13, 2013, 11:35pm UTC](https://www.ruby-forum.com/t/async-notification-in-nginx/228883 "2013-05-13T23:35:40Z")

</div>

I am writing a Niginx module that from several of worker threads that I created by own, I need to notify Nginx’s main thread so the main thread (single-threaded nginx) doesn’t need to poll periodically in timer contex…

---

## [Ngx\_openresty stable version 1.2.7.8 and devel version 1.2.8.3](https://www.ruby-forum.com/t/ngx-openresty-stable-version-1-2-7-8-and-devel-version-1-2-8-3/228943)

<div class="topic-metadata">

**Author:** [@agentzh](https://www.ruby-forum.com/u/agentzh)\
**Replies:** 0\
**Last updated:** [May 13, 2013, 9:47pm UTC](https://www.ruby-forum.com/t/ngx-openresty-stable-version-1-2-7-8-and-devel-version-1-2-8-3/228943 "2013-05-13T21:47:00Z")

</div>

Hello! I’ve just released ngx\_openresty stable version 1.2.7.8 and devel version 1.2.8.3 which both just contain the official patch for the nginx security advisory CVE-2013-2070: http://openresty.org/#Download Best …

---

## [Dynamic upstream configuration](https://www.ruby-forum.com/t/dynamic-upstream-configuration/228305)

<div class="topic-metadata">

**Author:** [@mamoos1](https://www.ruby-forum.com/u/mamoos1)\
**Replies:** 4\
**Last updated:** [May 13, 2013, 3:07pm UTC](https://www.ruby-forum.com/t/dynamic-upstream-configuration/228305 "2013-05-13T15:07:47Z")

</div>

Hi, I have an nginx configured as a reverse proxy using proxy\_pass. This is a dynamic reverse proxy, it fetches content for users in accordance to the HOST header in the requests. The problem I encountered is that t…

---

## [Finding docroot directory?](https://www.ruby-forum.com/t/finding-docroot-directory/228922)

<div class="topic-metadata">

**Author:** [@Shohreh](https://www.ruby-forum.com/u/Shohreh)\
**Replies:** 5\
**Last updated:** [May 13, 2013, 1:42pm UTC](https://www.ruby-forum.com/t/finding-docroot-directory/228922 "2013-05-13T13:42:28Z")

</div>

Hello I’m running Nginx 1.4.1 on an appliance running Debian 6, and can’t find from which directory Nginx is serving files. According to /etc/nginx.conf, the location for “/” is “root /var/www;”, but even renaming t…

---

## [Nginx security advisory (CVE-2013-2070)](https://www.ruby-forum.com/t/nginx-security-advisory-cve-2013-2070/228927)

<div class="topic-metadata">

**Author:** [@Maxim\_D](https://www.ruby-forum.com/u/Maxim_D)\
**Replies:** 0\
**Last updated:** [May 13, 2013, 1:34pm UTC](https://www.ruby-forum.com/t/nginx-security-advisory-cve-2013-2070/228927 "2013-05-13T13:34:17Z")

</div>

Hello! A security problem related to CVE-2013-2028 was identified, affecting some previous nginx versions if proxy\_pass to untrusted upstream HTTP servers is used. The problem may lead to a denial of service or a dis…

---

## [Location matching](https://www.ruby-forum.com/t/location-matching/228907)

<div class="topic-metadata">

**Author:** [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Replies:** 6\
**Last updated:** [May 13, 2013, 1:07pm UTC](https://www.ruby-forum.com/t/location-matching/228907 "2013-05-13T13:07:58Z")

</div>

I’ve just had to move subversion onto a server that’s already serving network wordpress via nginx. Most things work via /svn in a subversion client but I can’t for the life of me figure out how to stop /svn.\*.php hitt…

---

## [Reading request\_body before passing to backend server](https://www.ruby-forum.com/t/reading-request-body-before-passing-to-backend-server/228897)

<div class="topic-metadata">

**Author:** [@dktp1](https://www.ruby-forum.com/u/dktp1)\
**Replies:** 1\
**Last updated:** [May 13, 2013, 9:09am UTC](https://www.ruby-forum.com/t/reading-request-body-before-passing-to-backend-server/228897 "2013-05-13T09:09:34Z")

</div>

I am trying to read if a specific value is set (passed) as a POST using request\_body. What I am trying to do is: server { … if ($request\_body ~ “API-value-Iwanttocheck”) { set $my\_api “TRUE”; } And later on pass …

---

## [Nginx -\> strategy?](https://www.ruby-forum.com/t/nginx-strategy/228917)

<div class="topic-metadata">

**Author:** [@larry](https://www.ruby-forum.com/u/larry)\
**Replies:** 1\
**Last updated:** [May 13, 2013, 8:37am UTC](https://www.ruby-forum.com/t/nginx-strategy/228917 "2013-05-13T08:37:26Z")

</div>

Hello, I would like to know how nginx could deal with this situation the most comfortable way to serve static files : Is tree traversing fast on xfs/ext4 filesystems ? aaa/bbb/ccc number of files inside the last su…

---

## [JavaScript and CSS minifiers questions](https://www.ruby-forum.com/t/javascript-and-css-minifiers-questions/228915)

<div class="topic-metadata">

**Author:** [@dcreatorx](https://www.ruby-forum.com/u/dcreatorx)\
**Replies:** 0\
**Last updated:** [May 13, 2013, 7:57am UTC](https://www.ruby-forum.com/t/javascript-and-css-minifiers-questions/228915 "2013-05-13T07:57:43Z")

</div>

Hi, I’m trying to set up JavasCript and CSS minify via the CPAN modules. I’m using debian 6 64 bit squeeze. I have compiled Nginx with perl module, installed all build dependencies before compiling, downloaded CPAN JS …

---

## [Nginx-1.4 proxy requests being continious](https://www.ruby-forum.com/t/nginx-1-4-proxy-requests-being-continious/228825)

<div class="topic-metadata">

**Author:** [@Daniel\_Black](https://www.ruby-forum.com/u/Daniel_Black)\
**Replies:** 3\
**Last updated:** [May 12, 2013, 4:47am UTC](https://www.ruby-forum.com/t/nginx-1-4-proxy-requests-being-continious/228825 "2013-05-12T04:47:06Z")

</div>

A request for /img/file\_doesnt\_exist.jpg results in the backend server (192.168.129.90) getting continuous requests for the same file (which doesn’t exist there either so 404 each time), while the original requester w…

---

## [Nginx + Mono (OpenBSD 5.3)](https://www.ruby-forum.com/t/nginx-mono-openbsd-5-3/228895)

<div class="topic-metadata">

**Author:** [@Gee](https://www.ruby-forum.com/u/Gee)\
**Replies:** 0\
**Last updated:** [May 12, 2013, 12:56am UTC](https://www.ruby-forum.com/t/nginx-mono-openbsd-5-3/228895 "2013-05-12T00:56:20Z")

</div>

It’s looking like he permissions issue may be related to chroot (OpenBSD appears to run nginx in ‘jail’). This all seems sane - but unfortunately, my \*nix-foo isn’t strong enough to work out which is the best path fo…

---

## [Is static access\_log within if-in-location better than dynamic global?](https://www.ruby-forum.com/t/is-static-access-log-within-if-in-location-better-than-dynamic-global/228891)

<div class="topic-metadata">

**Author:** [@Constantine\_ASMure](https://www.ruby-forum.com/u/Constantine_ASMure)\
**Replies:** 0\
**Last updated:** [May 11, 2013, 8:54pm UTC](https://www.ruby-forum.com/t/is-static-access-log-within-if-in-location-better-than-dynamic-global/228891 "2013-05-11T20:54:31Z")

</div>

Hi, According to Module ngx\_http\_log\_module, the access\_log directive cannot be used within an if in server, only within an if in location. Indeed, it doesn’t actually work within an if directly within server, but v…

---

## [Proxying based on protocol (e.g. "ws"/"wss")?](https://www.ruby-forum.com/t/proxying-based-on-protocol-e-g-ws-wss/228805)

<div class="topic-metadata">

**Author:** [@Daniel\_Griscom](https://www.ruby-forum.com/u/Daniel_Griscom)\
**Replies:** 6\
**Last updated:** [May 11, 2013, 5:06pm UTC](https://www.ruby-forum.com/t/proxying-based-on-protocol-e-g-ws-wss/228805 "2013-05-11T17:06:06Z")

</div>

I’m an nginx newbie, and need use use it as a front end for a website that also handles websocket connections. I have the configuration set up so that requests to a specific URI match a location section, which then pr…

---

## [Disable automatic urlencoding with proxy\_pass](https://www.ruby-forum.com/t/disable-automatic-urlencoding-with-proxy-pass/228835)

<div class="topic-metadata">

**Author:** [@lupin](https://www.ruby-forum.com/u/lupin)\
**Replies:** 2\
**Last updated:** [May 10, 2013, 1:03am UTC](https://www.ruby-forum.com/t/disable-automatic-urlencoding-with-proxy-pass/228835 "2013-05-10T01:03:37Z")

</div>

Hi, Any way to disable urlencode on nginx with proxy\_pass? Following is my config and as suggested on google I already removed the “/” URI part of of this “proxy\_pass http://127.0.0.1:8090;” Any idea how to proceed …

---

## [HTTP Basic Auth question](https://www.ruby-forum.com/t/http-basic-auth-question/228645)

<div class="topic-metadata">

**Author:** [@Russ\_L](https://www.ruby-forum.com/u/Russ_L)\
**Replies:** 4\
**Last updated:** [May 10, 2013, 12:25am UTC](https://www.ruby-forum.com/t/http-basic-auth-question/228645 "2013-05-10T00:25:38Z")

</div>

Hello, I am running nginx as a reverse proxy to a python application. I am wondering how I would be able to pass ONLY the user account and not the password. Can this be done? Thanks!

---

## [Websocket proxy](https://www.ruby-forum.com/t/websocket-proxy/228821)

<div class="topic-metadata">

**Author:** [@Alder\_N](https://www.ruby-forum.com/u/Alder_N)\
**Replies:** 2\
**Last updated:** [May 9, 2013, 11:51pm UTC](https://www.ruby-forum.com/t/websocket-proxy/228821 "2013-05-09T23:51:45Z")

</div>

This must have been discussed before but I am new to nginx and this forum. I am upgrading to 1.4 to use its websocket proxy feature. Say I have a websocket server running at port 81, so I want to forward all websocke…

---

## [Location support for multiple URLs](https://www.ruby-forum.com/t/location-support-for-multiple-urls/228022)

<div class="topic-metadata">

**Author:** [@Typlo](https://www.ruby-forum.com/u/Typlo)\
**Replies:** 2\
**Last updated:** [May 9, 2013, 3:10pm UTC](https://www.ruby-forum.com/t/location-support-for-multiple-urls/228022 "2013-05-09T15:10:27Z")

</div>

Hello, I would like to use the FastCGI cache feature of nginx for my web application. But I need to use it only for a set of URL. I would like to use it for the following locations: Domain.com\[ANY ID HERE\] Example: …

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

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