# Server

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

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

---

## [Enabling lan card using ruby](https://www.ruby-forum.com/t/enabling-lan-card-using-ruby/200670)

<div class="topic-metadata">

**Author:** [@nikuSESS](https://www.ruby-forum.com/u/nikuSESS)\
**Replies:** 0\
**Last updated:** [December 19, 2010, 5:00am UTC](https://www.ruby-forum.com/t/enabling-lan-card-using-ruby/200670 "2010-12-19T05:00:49Z")

</div>

Suppose I want to make a program which enables a lan card at some particular time…How do I do it? I need the syntax basically

---

## [Does the poll()ing a shared pipe bug also affects nginx?](https://www.ruby-forum.com/t/does-the-poll-ing-a-shared-pipe-bug-also-affects-nginx/200617)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 1\
**Last updated:** [December 17, 2010, 2:47pm UTC](https://www.ruby-forum.com/t/does-the-poll-ing-a-shared-pipe-bug-also-affects-nginx/200617 "2010-12-17T14:47:47Z")

</div>

Hello, At the dovecot mailing list there has been a discussion about what seems to be a bug where, in linux, systems poll()ing a shared pipe triggers unnecessary context switches. Does ningx also poll()s shared pipes…

---

## [Read a local variable / http variable from config file in C](https://www.ruby-forum.com/t/read-a-local-variable-http-variable-from-config-file-in-c/194120)

<div class="topic-metadata">

**Author:** [@breaks](https://www.ruby-forum.com/u/breaks)\
**Replies:** 1\
**Last updated:** [December 17, 2010, 12:04pm UTC](https://www.ruby-forum.com/t/read-a-local-variable-http-variable-from-config-file-in-c/194120 "2010-12-17T12:04:59Z")

</div>

Hello, I write a new module to nginx, and I have a small problem, because I don’t know how I can read local/http variable (for example from GeoIP module) from nginx configuration file in my module. Below is a piece of …

---

## [FastCGI in various servers](https://www.ruby-forum.com/t/fastcgi-in-various-servers/200565)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 2\
**Last updated:** [December 17, 2010, 8:52am UTC](https://www.ruby-forum.com/t/fastcgi-in-various-servers/200565 "2010-12-17T08:52:25Z")

</div>

Hello, I have a question about fastcgi. If I use 5 web server with fastcgi, with a script that works with session variables, if it balances the request to another different server. How to access the session variables…

---

## [Replacing the php regex with try\_files?](https://www.ruby-forum.com/t/replacing-the-php-regex-with-try-files/200608)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 0\
**Last updated:** [December 17, 2010, 8:10am UTC](https://www.ruby-forum.com/t/replacing-the-php-regex-with-try-files/200608 "2010-12-17T08:10:15Z")

</div>

Hi all, Right now I use this type of configuration: location / { try\_files $uri $uri/ /index.php?q=$uri&$args; } location ~ \\.php$ { fastcgi\_pass …

---

## [Proxy Caching](https://www.ruby-forum.com/t/proxy-caching/200607)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 0\
**Last updated:** [December 17, 2010, 6:43am UTC](https://www.ruby-forum.com/t/proxy-caching/200607 "2010-12-17T06:43:54Z")

</div>

Ok I understand that nginx doesnt cache responses with Set-Cookie in them. What do I have to do to remove that header and force it to be cached. What other headers prevent caching (cache-control?)? Id like to make ng…

---

## [Redirecting without canonicalizing the port](https://www.ruby-forum.com/t/redirecting-without-canonicalizing-the-port/200597)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 1\
**Last updated:** [December 17, 2010, 1:07am UTC](https://www.ruby-forum.com/t/redirecting-without-canonicalizing-the-port/200597 "2010-12-17T01:07:41Z")

</div>

Can I redirect to a URL that uses the port number in the request, as opposed to the port specified in listen? (so as to work with proxies/tunnels) E.g., if I have listen 444 and have a tunnel so that my client is sur…

---

## [Nginx + PHP = VERY High CPU Usage](https://www.ruby-forum.com/t/nginx-php-very-high-cpu-usage/200407)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 7\
**Last updated:** [December 17, 2010, 12:33am UTC](https://www.ruby-forum.com/t/nginx-php-very-high-cpu-usage/200407 "2010-12-17T00:33:55Z")

</div>

Hello All, I was using APACHE and I decided to migrate to nginx. I researched and nginx is supposed to have a completely superior performance for webpages that have lot of simultaneous requests, such as real time pag…

---

## [Two small questions about embedded perl](https://www.ruby-forum.com/t/two-small-questions-about-embedded-perl/200538)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 5\
**Last updated:** [December 16, 2010, 10:00pm UTC](https://www.ruby-forum.com/t/two-small-questions-about-embedded-perl/200538 "2010-12-16T22:00:27Z")

</div>

Hi there, i just got two small questions about using embedded perl: first: i would like to “rewrite” the request using a perl module, since the rewrite is a bit more than just regexp. I thought that using “internal\_…

---

## [The potential bug incurred by "one\_addr"](https://www.ruby-forum.com/t/the-potential-bug-incurred-by-one-addr/229184)

<div class="topic-metadata">

**Author:** [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Replies:** 1\
**Last updated:** [December 16, 2010, 2:28pm UTC](https://www.ruby-forum.com/t/the-potential-bug-incurred-by-one-addr/229184 "2010-12-16T14:28:06Z")

</div>

In ngx\_inet.c, there is a code piece of function “ngx\_inet\_resolve\_host”. If I set u-\>one\_addr to 1， but unfortunately this hostname map to multiple IP addresses, such as 10.37.4.92 myhost 127.0.0.1 myhost in /etc/hos…

---

## [Redirecting http requests to 5 different apache servers](https://www.ruby-forum.com/t/redirecting-http-requests-to-5-different-apache-servers/200577)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 1\
**Last updated:** [December 16, 2010, 2:00pm UTC](https://www.ruby-forum.com/t/redirecting-http-requests-to-5-different-apache-servers/200577 "2010-12-16T14:00:56Z")

</div>

Hello, i’m running 5 apache webservers (ex: www1.mysite.com, www2.mysite.com, www3.mysite.com, www4.mysite.com, www5.mysite.com) with same content. It’s possible make some king of round-robin/loadbalancer with a ngix …

---

## [Response code 400 for prematurely closed connection](https://www.ruby-forum.com/t/response-code-400-for-prematurely-closed-connection/226179)

<div class="topic-metadata">

**Author:** [@denis](https://www.ruby-forum.com/u/denis)\
**Replies:** 0\
**Last updated:** [December 16, 2010, 11:22am UTC](https://www.ruby-forum.com/t/response-code-400-for-prematurely-closed-connection/226179 "2010-12-16T11:22:17Z")

</div>

Hello! Please correct me if I’m wrong, but I noticed if you open and immediately close a TCP connection to HTTP port without sending any HTTP headers or anything, it ends up as xxx.xxx.xxx.xxx - - \[16/Dec/2010:18:14:…

---

## ["index" directive not working with dynamic server\_name](https://www.ruby-forum.com/t/index-directive-not-working-with-dynamic-server-name/200522)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 5\
**Last updated:** [December 16, 2010, 10:44am UTC](https://www.ruby-forum.com/t/index-directive-not-working-with-dynamic-server-name/200522 "2010-12-16T10:44:33Z")

</div>

Hi, I recently upgraded to nginx 0.8.53 as it has support for regular expressions in the server\_name directive. However, when using this, the index directive gets ignored and a directory listing is displayed. I’ve i…

---

## [Why "user" directive is not effective for master process?](https://www.ruby-forum.com/t/why-user-directive-is-not-effective-for-master-process/226172)

<div class="topic-metadata">

**Author:** [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Replies:** 2\
**Last updated:** [December 16, 2010, 6:34am UTC](https://www.ruby-forum.com/t/why-user-directive-is-not-effective-for-master-process/226172 "2010-12-16T06:34:23Z")

</div>

When I set “user user1;” in config and use sudo to start nginx, all worker processes are owned by “user1”, only master process are owned by “root”. With these, I can’t create a Linux account with proper permission set…

---

## [SSL enabled slowing down site](https://www.ruby-forum.com/t/ssl-enabled-slowing-down-site/226173)

<div class="topic-metadata">

**Author:** [@fanboy](https://www.ruby-forum.com/u/fanboy)\
**Replies:** 0\
**Last updated:** [December 16, 2010, 4:57am UTC](https://www.ruby-forum.com/t/ssl-enabled-slowing-down-site/226173 "2010-12-16T04:57:28Z")

</div>

Using 0.9.3 (compiled), if I enable the SSL lines then :80 traffic slows down (as does SSL traffic), remove the SSL lines and everything is quicker… Looking through my config, am I doing anything wrong or can it be im…

---

## [Named Locations](https://www.ruby-forum.com/t/named-locations/200566)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 0\
**Last updated:** [December 15, 2010, 11:07pm UTC](https://www.ruby-forum.com/t/named-locations/200566 "2010-12-15T23:07:07Z")

</div>

Is it possible to have named locations?? So for example: path /foo /bar/ /baz = @folder\_set location @folder\_set { … } This feature would help tremendously, because I have about 300 sites I need to load balance, an…

---

## [Server performance metrics](https://www.ruby-forum.com/t/server-performance-metrics/200560)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 0\
**Last updated:** [December 15, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/server-performance-metrics/200560 "2010-12-15T18:25:05Z")

</div>

What’s a good metric that I can look at to see whether or not our Nginx server is performing optimally? I’m attaching an image showing stats for the past week but I’m not clear on whether or not they would be conside…

---

## [Fwd: server performance metrics](https://www.ruby-forum.com/t/fwd-server-performance-metrics/226160)

<div class="topic-metadata">

**Author:** [@iberci](https://www.ruby-forum.com/u/iberci)\
**Replies:** 0\
**Last updated:** [December 15, 2010, 6:25pm UTC](https://www.ruby-forum.com/t/fwd-server-performance-metrics/226160 "2010-12-15T18:25:04Z")

</div>

oops, forgot attachment ---------- Forwarded message ---------- From: Ilan B. removed\_email\_address@domain.invalid Date: Wed, Dec 15, 2010 at 12:15 PM Subject: server performance metrics To: removed\_email\_address@do…

---

## [Set-Cookie-trouble](https://www.ruby-forum.com/t/set-cookie-trouble/226155)

<div class="topic-metadata">

**Author:** [@SSAnton\_MS\_llerSS\_S](https://www.ruby-forum.com/u/SSAnton_MS_llerSS_S)\
**Replies:** 1\
**Last updated:** [December 15, 2010, 1:42pm UTC](https://www.ruby-forum.com/t/set-cookie-trouble/226155 "2010-12-15T13:42:28Z")

</div>

Hi there, we are switching from Pound to nginx. Now we have problems with cookies. The backend systems we are using are Apache-Servers. It seems that nginx is cutting off the “Set-Cookie:”-Line. Is there a limitation…

---

## [Custom page for 400 (Bad Request)](https://www.ruby-forum.com/t/custom-page-for-400-bad-request/200530)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 14\
**Last updated:** [December 15, 2010, 1:10pm UTC](https://www.ruby-forum.com/t/custom-page-for-400-bad-request/200530 "2010-12-15T13:10:16Z")

</div>

Hello everyone! I have a decent number of hits with very large cookies. It was a bug of our application and it’s fixed now, but we have to do something with these clients, because all they are seeing now is the standa…

---

## [Upstream closed prematurely FastCGI stdout while reading response header from upstream](https://www.ruby-forum.com/t/upstream-closed-prematurely-fastcgi-stdout-while-reading-response-header-from-upstream/226152)

<div class="topic-metadata">

**Author:** [@Alexander\_Skwar](https://www.ruby-forum.com/u/Alexander_Skwar)\
**Replies:** 0\
**Last updated:** [December 15, 2010, 12:16pm UTC](https://www.ruby-forum.com/t/upstream-closed-prematurely-fastcgi-stdout-while-reading-response-header-from-upstream/226152 "2010-12-15T12:16:09Z")

</div>

Hi. I’m trying to setup nginx 0.8.54 on a Solaris 10 system so, that it is able to serve “normal” CGI scripts. I have read http://wiki.nginx.org/SimpleCGI and tried to follow it - as it’s not working, I guess I made…

---

## [Nginx-0.7.68](https://www.ruby-forum.com/t/nginx-0-7-68/200537)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 0\
**Last updated:** [December 14, 2010, 8:58pm UTC](https://www.ruby-forum.com/t/nginx-0-7-68/200537 "2010-12-14T20:58:28Z")

</div>

Changes with nginx 0.7.68 14 Dec 2010 \*) Bugfix: if there was a single server for given IPv6 address:port pair, then captures in regular expressions in a "server\_name" direc…

---

## [Nginx-0.8.54](https://www.ruby-forum.com/t/nginx-0-8-54/200521)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 1\
**Last updated:** [December 14, 2010, 8:53pm UTC](https://www.ruby-forum.com/t/nginx-0-8-54/200521 "2010-12-14T20:53:25Z")

</div>

Changes with nginx 0.8.54 14 Dec 2010 \*) Bugfix: if there was a single server for given IPv6 address:port pair, then captures in regular expressions in a "server\_name" direc…

---

## [Consultation on the reverse proxy configuration](https://www.ruby-forum.com/t/consultation-on-the-reverse-proxy-configuration/226134)

<div class="topic-metadata">

**Author:** [@SSJose\_Damian\_Garri](https://www.ruby-forum.com/u/SSJose_Damian_Garri)\
**Replies:** 0\
**Last updated:** [December 14, 2010, 7:12pm UTC](https://www.ruby-forum.com/t/consultation-on-the-reverse-proxy-configuration/226134 "2010-12-14T19:12:15Z")

</div>

I am trying to configure nginx as reverse proxy and I have some problems and doubts. First, the settings are as follows: Nginx 192.168.1.1 Apache 192.168.1.2 this is the original configuration http://pastebin.com/T3…

---

## [Load balancing question / recommendation](https://www.ruby-forum.com/t/load-balancing-question-recommendation/200526)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 1\
**Last updated:** [December 14, 2010, 4:55pm UTC](https://www.ruby-forum.com/t/load-balancing-question-recommendation/200526 "2010-12-14T16:55:49Z")

</div>

Hi All, Currently we have a single web server (nginx) with multiple php application servers (php-fpm) and the load is being handled well. The raid controller failed last week on the web server and we were down for …

---

## [Rewrite rule of url w/args to url?](https://www.ruby-forum.com/t/rewrite-rule-of-url-w-args-to-url/226129)

<div class="topic-metadata">

**Author:** [@Robert\_La\_Ferla](https://www.ruby-forum.com/u/Robert_La_Ferla)\
**Replies:** 0\
**Last updated:** [December 14, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/rewrite-rule-of-url-w-args-to-url/226129 "2010-12-14T16:38:09Z")

</div>

I want to rewrite: /somedirectory/file.zip?arg1=testing/test&opt=yes to /somedirectory/file.zip/testing/test i.e. it takes the base path and appends $arg1 to it and strips out other args. What’s the best way to do…

---

## [Nested error\_page](https://www.ruby-forum.com/t/nested-error-page/200514)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 4\
**Last updated:** [December 14, 2010, 12:58pm UTC](https://www.ruby-forum.com/t/nested-error-page/200514 "2010-12-14T12:58:47Z")

</div>

hi i have a situtation where i would need something similar to this: location / { error\_page 404 = /fallback\_all; // do a request to get content from memcache, if not found go to /fallback\_all } location = /fallba…

---

## ['sudo nginx -s reload' and 'nginx -t' started to need a minute to complete](https://www.ruby-forum.com/t/sudo-nginx-s-reload-and-nginx-t-started-to-need-a-minute-to-complete/200501)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 2\
**Last updated:** [December 14, 2010, 10:59am UTC](https://www.ruby-forum.com/t/sudo-nginx-s-reload-and-nginx-t-started-to-need-a-minute-to-complete/200501 "2010-12-14T10:59:19Z")

</div>

While using Ubuntu 10.10+Nginx0.9.3+php5-fpm 5.3.3-1ubuntu9.1: Do you know of any reason for ‘sudo nginx -s reload’ and ‘nginx -t’ suddenly start needing almost a minute to complete? while using: server { listen exa…

---

## [Load Balancing with rewrite](https://www.ruby-forum.com/t/load-balancing-with-rewrite/200515)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 0\
**Last updated:** [December 14, 2010, 8:08am UTC](https://www.ruby-forum.com/t/load-balancing-with-rewrite/200515 "2010-12-14T08:08:42Z")

</div>

Hi!, I’m doing a project to load balance our web services, but our web services are very strict in terms of received url. nginx config upstream mysite { server testbox1:50011; server testbox2:50012 } server { …

---

## [Env lost effect in single process mode](https://www.ruby-forum.com/t/env-lost-effect-in-single-process-mode/200477)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 2\
**Last updated:** [December 14, 2010, 3:21am UTC](https://www.ruby-forum.com/t/env-lost-effect-in-single-process-mode/200477 "2010-12-14T03:21:30Z")

</div>

Hey, I find when I set daemon off and master\_process off to enter the dev single process mode, env simply doesn’t work. My custom module depending on that env can’t find them. So I check the code and find in ngx\_singl…

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

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