# Server

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

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

---

## [Resolver didn't work when proxy\_pass is a given domain](https://www.ruby-forum.com/t/resolver-didnt-work-when-proxy-pass-is-a-given-domain/210709)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [August 15, 2011, 3:20pm UTC](https://www.ruby-forum.com/t/resolver-didnt-work-when-proxy-pass-is-a-given-domain/210709 "2011-08-15T15:20:37Z")

</div>

sorry for my poor english first. I run nginx as a reverse proxy server,and set a dns server for it. I add the dns for the nginx at http directive: resolver 192.168.0.106; In nginx configuration: proxy\_pass http://te…

---

## [The real difference between $host and $http\_host](https://www.ruby-forum.com/t/the-real-difference-between-host-and-http-host/210702)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [August 15, 2011, 12:19pm UTC](https://www.ruby-forum.com/t/the-real-difference-between-host-and-http-host/210702 "2011-08-15T12:19:50Z")

</div>

The wiki page of “$host” says $host and $host\_addr are different only when there is no “Host” header or the “Host” header is empty. But I found when “Host” contains port number, $host never contains the port number wh…

---

## [Routing based on cookies](https://www.ruby-forum.com/t/routing-based-on-cookies/210689)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [August 15, 2011, 11:59am UTC](https://www.ruby-forum.com/t/routing-based-on-cookies/210689 "2011-08-15T11:59:59Z")

</div>

Hi guys! I have Nginx configured as load balancer to some number of application servers. I need to configure Nginx in such a way that if there is cookie set in request (“server\_id=\<some\_number\>”), I have to forward t…

---

## [Status Code 499](https://www.ruby-forum.com/t/status-code-499/210696)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [August 15, 2011, 11:29am UTC](https://www.ruby-forum.com/t/status-code-499/210696 "2011-08-15T11:29:05Z")

</div>

What’s the reason for error “499”? How to resolve this error? Thanks Posted at Nginx Forum:

---

## [Nginx 404 error please help me](https://www.ruby-forum.com/t/nginx-404-error-please-help-me/210697)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [August 15, 2011, 5:52am UTC](https://www.ruby-forum.com/t/nginx-404-error-please-help-me/210697 "2011-08-15T05:52:51Z")

</div>

my nginx web unusually show 404 not found why the web error show 2011/08/12 03:43:28 \[error\] 23729#0: 1644359 connect() failed (110: Connection timed out) while connecting to upstream, client: ...\* , server: \_\*, requ…

---

## [PHP files being downloaded on condition](https://www.ruby-forum.com/t/php-files-being-downloaded-on-condition/210193)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 10\
**Last updated:** [August 14, 2011, 6:26am UTC](https://www.ruby-forum.com/t/php-files-being-downloaded-on-condition/210193 "2011-08-14T06:26:27Z")

</div>

Hello, guys, Another Apache convert here. My 3rd day with nginx and loving it. I have a nginx + php-fpm setup. The problem is that nginx downloads the PHP scripts without being parsed instead of passing them to php-fp…

---

## [Can't get mongrel to work as daemon](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512)

<div class="topic-metadata">

**Author:** [@sevensoft](https://www.ruby-forum.com/u/sevensoft)\
**Replies:** 3\
**Last updated:** [August 13, 2011, 11:52pm UTC](https://www.ruby-forum.com/t/cant-get-mongrel-to-work-as-daemon/138512 "2011-08-13T23:52:55Z")

</div>

I’m a mongrel newbie and a linux newbie. I have two CENTOS 5 servers. On server A, my app works fine, with mongrel in daemon mode. On server B, it works fine if I just say mongrel\_rails start, but if I add -d, it do…

---

## [Problem with post\_action when used with return 202; and POST request](https://www.ruby-forum.com/t/problem-with-post-action-when-used-with-return-202-and-post-request/210530)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [August 13, 2011, 10:07pm UTC](https://www.ruby-forum.com/t/problem-with-post-action-when-used-with-return-202-and-post-request/210530 "2011-08-13T22:07:09Z")

</div>

Hi, We are trying to use post\_action in a location block that only has “return 202;”. Everything works fine for GET requests and with small POST requests, but if the client request body + headers are over 1kB, nginx …

---

## [Why nginx not support php new $class()](https://www.ruby-forum.com/t/why-nginx-not-support-php-new-class/210662)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [August 13, 2011, 5:26pm UTC](https://www.ruby-forum.com/t/why-nginx-not-support-php-new-class/210662 "2011-08-13T17:26:27Z")

</div>

Hi everyone: the error is 502 Bad Gateway nginx/0.7.65 my php scripts: $RTR =& load\_class(‘Router’); ----\>pass … $class = $RTR-\>fetch\_class(); ----\>pass … $CI = new $class(); ----\>nopass my breakpoint step …

---

## [Question about the timezone](https://www.ruby-forum.com/t/question-about-the-timezone/210663)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [August 13, 2011, 4:28pm UTC](https://www.ruby-forum.com/t/question-about-the-timezone/210663 "2011-08-13T16:28:57Z")

</div>

hi,everyone: i have a question about the System TimeZone,i have a Server with CentOS 5,its previous timezone is UTC timezone,and nginx use it as default timezone. now today i changed the timezone to CST(+8) of Asia/S…

---

## [Detect suspicious activity with nginx](https://www.ruby-forum.com/t/detect-suspicious-activity-with-nginx/210506)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [August 13, 2011, 1:38am UTC](https://www.ruby-forum.com/t/detect-suspicious-activity-with-nginx/210506 "2011-08-13T01:38:37Z")

</div>

Hi guys We are looking for a way to detect suspicious activity on high-traffic websites. Parsing log files is not good option here, our current nginx config generates around 90G of logs for around 412K http requests e…

---

## [Sflow module and increasing useragent](https://www.ruby-forum.com/t/sflow-module-and-increasing-useragent/210517)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 7\
**Last updated:** [August 12, 2011, 9:59pm UTC](https://www.ruby-forum.com/t/sflow-module-and-increasing-useragent/210517 "2011-08-12T21:59:55Z")

</div>

If I wanted to increase the amount of bytes logged by the sflow module for the user agent to, say, 128 bytes, what would I need to change? I tried changing this: (in ngx\_http\_sflow.h) #define SFLHTTP\_MAX\_USERAGENT\_LE…

---

## [Be Aware Russian DDOS Hacker Ivan Ivanov of Khabarovsk](https://www.ruby-forum.com/t/be-aware-russian-ddos-hacker-ivan-ivanov-of-khabarovsk/210629)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 5\
**Last updated:** [August 12, 2011, 7:54pm UTC](https://www.ruby-forum.com/t/be-aware-russian-ddos-hacker-ivan-ivanov-of-khabarovsk/210629 "2011-08-12T19:54:42Z")

</div>

Since last week, Our website SuntekStore.com has been under DDOS (Distributed Denial Of Service)attack by someone who goes by the name of Ivan Alekseevich Ivanov from Khabarovsk, Russia and he demanded $3,500 to stop…

---

## [Configure auth\_basic with Nginx and Passenger](https://www.ruby-forum.com/t/configure-auth-basic-with-nginx-and-passenger/210625)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [August 12, 2011, 6:04pm UTC](https://www.ruby-forum.com/t/configure-auth-basic-with-nginx-and-passenger/210625 "2011-08-12T18:04:25Z")

</div>

I’m trying to set up a basic authentication with Nginx. My server configuration look like that: server { listen 80; server\_name DOMAIN; root /var/www/web-front-dev/current/public; error\_log /var/log/nginx/web-f…

---

## [Nginx + PHP FASTCGI FAILS - how to debug?](https://www.ruby-forum.com/t/nginx-php-fastcgi-fails-how-to-debug/181489)

<div class="topic-metadata">

**Author:** [@Niro](https://www.ruby-forum.com/u/Niro)\
**Replies:** 17\
**Last updated:** [August 12, 2011, 1:33pm UTC](https://www.ruby-forum.com/t/nginx-php-fastcgi-fails-how-to-debug/181489 "2011-08-12T13:33:44Z")

</div>

I have an Ubuntu 9.10 server on AMAZON EC2 running Nginx +PHP with PHP FASTCGI via port 9000. The server runs fine for a few minutes and after a few minutes (several thousands of hits in this case) FastCGI dies and Ng…

---

## [Slow down, but not stop, serving pages to bot that doesn't respect robots.txt delay](https://www.ruby-forum.com/t/slow-down-but-not-stop-serving-pages-to-bot-that-doesnt-respect-robots-txt-delay/210591)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [August 12, 2011, 1:33pm UTC](https://www.ruby-forum.com/t/slow-down-but-not-stop-serving-pages-to-bot-that-doesnt-respect-robots-txt-delay/210591 "2011-08-12T13:33:44Z")

</div>

Hi all. I want to differentiate the nginx awesome rate limiting for requests, in order to enforce bots to respect my directives (but not to block them): so i created these limit\_req\_zone: limit\_req\_zone $binary\_remot…

---

## [Compile nginx for windows](https://www.ruby-forum.com/t/compile-nginx-for-windows/205988)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [August 12, 2011, 1:25pm UTC](https://www.ruby-forum.com/t/compile-nginx-for-windows/205988 "2011-08-12T13:25:41Z")

</div>

Hi,all: I have an urgency task and I need to compile nginx with my own http moudle for windows,I know cygwin can help me but if i want to use nginx on windows independent of the .dll file of cygwin,I need only …

---

## [Different FastCGI backend for /subdir: regex not matching](https://www.ruby-forum.com/t/different-fastcgi-backend-for-subdir-regex-not-matching/210575)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [August 12, 2011, 9:34am UTC](https://www.ruby-forum.com/t/different-fastcgi-backend-for-subdir-regex-not-matching/210575 "2011-08-12T09:34:30Z")

</div>

I have a virtual host, and for a certain subdirectory I want to use another fastcgi backend. What I have now goes something like: (…) location ~ /subdir/ { alias /var/www/otheraccount/public\_html/; # PH…

---

## [Pimcore Rewrite Rules to nginx](https://www.ruby-forum.com/t/pimcore-rewrite-rules-to-nginx/202764)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [August 12, 2011, 9:25am UTC](https://www.ruby-forum.com/t/pimcore-rewrite-rules-to-nginx/202764 "2011-08-12T09:25:51Z")

</div>

Hello, My big Problem are Rules like that. I’m not able to convert them. RewriteRule ^plugins/./static. - \[PT,L\] RewriteRule ^pimcore/static.\* - \[PT,L\] It would be very kind if anyone could help me. Best Regards He…

---

## [Hotlink prevention doesn't work for me?](https://www.ruby-forum.com/t/hotlink-prevention-doesnt-work-for-me/210598)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [August 11, 2011, 7:05pm UTC](https://www.ruby-forum.com/t/hotlink-prevention-doesnt-work-for-me/210598 "2011-08-11T19:05:11Z")

</div>

Hi all! I got the following in my config: location / { valid\_referers none blocked site.domain.com ~(google.); if ($invalid\_referer) { rewrite ^/wp-content/uploads.\*.(gif|jpg|jpeg|png)$ http://site2.domain.com/don…

---

## [Nginx-catap 1.1.0](https://www.ruby-forum.com/t/nginx-catap-1-1-0/210450)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [August 11, 2011, 4:48pm UTC](https://www.ruby-forum.com/t/nginx-catap-1-1-0/210450 "2011-08-11T16:48:34Z")

</div>

Добрый день! Anyway, I decided to put in the public access my fork. Code is available on github: GitHub - catap/nginx-catap: catap's nginx repository For some patch/module has documentation. Includes: Patches: bu…

---

## [Gziping static files](https://www.ruby-forum.com/t/gziping-static-files/209507)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [August 11, 2011, 4:03pm UTC](https://www.ruby-forum.com/t/gziping-static-files/209507 "2011-08-11T16:03:56Z")

</div>

Hi, I know nginx’s gzip module can compress files onthefly, and gzip\_static module can serve manually gziped file. Now is there any module/way available to cache the onthefly compression ? I dont want to compress all…

---

## [Problem of configuring client cert verification](https://www.ruby-forum.com/t/problem-of-configuring-client-cert-verification/210526)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [August 11, 2011, 3:19pm UTC](https://www.ruby-forum.com/t/problem-of-configuring-client-cert-verification/210526 "2011-08-11T15:19:19Z")

</div>

Hey I have a config like this: server { server\_name foo; listen 10.117.0.150:3443; ssl\_on; ssl\_certification /opt/mycrt/nginx.crt; ssl\_private\_key /opt/mycrt/nginx.key; ssl\_verify\_client on; ssl\_client\_certificat…

---

## [Memcached logging and setup question](https://www.ruby-forum.com/t/memcached-logging-and-setup-question/210561)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [August 10, 2011, 10:00pm UTC](https://www.ruby-forum.com/t/memcached-logging-and-setup-question/210561 "2011-08-10T22:00:47Z")

</div>

Hello fellow Nginx-ers, We have our nginx server set up with a “maintenance mode” (for upgrades) that will display an error page until the maintenance mode is turned off. However, I’d like memcached to bypass this an…

---

## [Caching objects served from PHP](https://www.ruby-forum.com/t/caching-objects-served-from-php/210539)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [August 10, 2011, 7:40pm UTC](https://www.ruby-forum.com/t/caching-objects-served-from-php/210539 "2011-08-10T19:40:35Z")

</div>

I have a server set up with nginx and PHP-FPM, running a framework that essentially sends all requests for content to PHP, which then serves it based on ACL rules. This includes images and other static content. What …

---

## [Nginx/0.8.54 502 bad gateway,very strange](https://www.ruby-forum.com/t/nginx-0-8-54-502-bad-gateway-very-strange/210528)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [August 10, 2011, 7:23pm UTC](https://www.ruby-forum.com/t/nginx-0-8-54-502-bad-gateway-very-strange/210528 "2011-08-10T19:23:53Z")

</div>

hi, guys. I have a big problem, it torture me two days. centos 4.7, nginx 0.8.54, php 5.2.14. There’s a page, it’s has four frames each include a php file. 502 bad gateway occured when I use chrome open it. But sel…

---

## [Nginx slow for no reason](https://www.ruby-forum.com/t/nginx-slow-for-no-reason/210434)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 8\
**Last updated:** [August 10, 2011, 5:02pm UTC](https://www.ruby-forum.com/t/nginx-slow-for-no-reason/210434 "2011-08-10T17:02:40Z")

</div>

Hello, I am running nginx 0.7.67-3 on debian, now without php, mostly serving one empty html. It was working fine for several weeks, handling about 800 connections per second with 2 work processes. Few days ago it st…

---

## [Twice chunked](https://www.ruby-forum.com/t/twice-chunked/210537)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [August 10, 2011, 4:46pm UTC](https://www.ruby-forum.com/t/twice-chunked/210537 "2011-08-10T16:46:34Z")

</div>

Hello, i use nginx 1.1.0 as balancer in front of some apache-server. In some cases, where the apache is generating bigger pages it sends content as chunked, nginx is adding a second “chunked” to http-response header. …

---

## [Proxying request - HTTP/1.1 502 Bad Gateway](https://www.ruby-forum.com/t/proxying-request-http-1-1-502-bad-gateway/210465)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [August 10, 2011, 1:57pm UTC](https://www.ruby-forum.com/t/proxying-request-http-1-1-502-bad-gateway/210465 "2011-08-10T13:57:18Z")

</div>

Hello, we have problem with proxying some RPC (POST) requests to a backend server. When a request is sent without proxy to the backend directly everrything is OK. So problem is probably caused by nginx proxy. When t…

---

## [Generating redirects to internal named locations](https://www.ruby-forum.com/t/generating-redirects-to-internal-named-locations/210415)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [August 10, 2011, 1:14pm UTC](https://www.ruby-forum.com/t/generating-redirects-to-internal-named-locations/210415 "2011-08-10T13:14:33Z")

</div>

Greetings nginx gurus. :slight\_smile: Is there a better way to generate a redirect to a named location than this? location @perl { fastcgi… } … location ~ .pl$ { try\_files /this\_should\_never\_exist @perl; } Thank…

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

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