# Server

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

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

---

## [Shared nginx configuration for multiple servers](https://www.ruby-forum.com/t/shared-nginx-configuration-for-multiple-servers/205411)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 7\
**Last updated:** [May 2, 2011, 9:26pm UTC](https://www.ruby-forum.com/t/shared-nginx-configuration-for-multiple-servers/205411 "2011-05-02T21:26:56Z")

</div>

We have bunch of servers, where we want to share configuration via SVN or GIT (or whatever). So on all server there will be the same configuration files set - this is easy to maintain. Although the most of the configu…

---

## [Nginx rewrite](https://www.ruby-forum.com/t/nginx-rewrite/206479)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [May 2, 2011, 9:19pm UTC](https://www.ruby-forum.com/t/nginx-rewrite/206479 "2011-05-02T21:19:31Z")

</div>

Hello, I need to rewrite the URL /img/14567.jpg to /img/14/14567.jpg The image name is 14567.jpg, which is saved in /14 folder. /14 is caluculated by 14567 / 1000 How to implement is NGX rewrite? Thanks, Yanxin

---

## [Using map and proxy\_pass](https://www.ruby-forum.com/t/using-map-and-proxy-pass/206387)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 8\
**Last updated:** [May 2, 2011, 5:35pm UTC](https://www.ruby-forum.com/t/using-map-and-proxy-pass/206387 "2011-05-02T17:35:48Z")

</div>

Hi list, I’m pulling my hair out. I need to pass to different proxies based on the first uri segment but don’t seem be able to get it working. I have the following map: map $uri $upstream { /abc/bla/ host01; /xyz…

---

## [Does Nginx block on file IO?](https://www.ruby-forum.com/t/does-nginx-block-on-file-io/206458)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 7\
**Last updated:** [May 2, 2011, 1:26pm UTC](https://www.ruby-forum.com/t/does-nginx-block-on-file-io/206458 "2011-05-02T13:26:29Z")

</div>

Hi. I was always under the impression that Nginx is non-blocking for file IO. Then I was told it wasn’t. I’m considering using Nginx to serve static images. Pretty much every connection will result in a file IO. If N…

---

## [Nginx and php fast cgi different server?](https://www.ruby-forum.com/t/nginx-and-php-fast-cgi-different-server/206461)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [May 2, 2011, 6:26am UTC](https://www.ruby-forum.com/t/nginx-and-php-fast-cgi-different-server/206461 "2011-05-02T06:26:56Z")

</div>

Hello All, I’m a newbie on nginx, currently i have configure nginx n php fast cgi with same server, i want to split nginx and php fast cgi with different, it’s posibble? I have test change fastcgi\_pass point di php f…

---

## [Nginx and google](https://www.ruby-forum.com/t/nginx-and-google/206401)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [May 1, 2011, 3:28am UTC](https://www.ruby-forum.com/t/nginx-and-google/206401 "2011-05-01T03:28:50Z")

</div>

freebsd 8 nginx-0.8.54 proxy works perfect. Any site loads very fast thru proxy pass but google do not wont to load! Any other indexing sites. Help. Here my config worker\_processes 1; events { worker\_connections …

---

## [Variables in if regexes](https://www.ruby-forum.com/t/variables-in-if-regexes/206426)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [May 1, 2011, 3:04am UTC](https://www.ruby-forum.com/t/variables-in-if-regexes/206426 "2011-05-01T03:04:42Z")

</div>

I have a caching system I need to bypass if the logging in user’s name is found in the $request\_uri. I’m trying to do something like this, but can’t get the variable to interpolate into the regex. Any suggestions pr…

---

## [Time tracing in nginx](https://www.ruby-forum.com/t/time-tracing-in-nginx/206421)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [April 30, 2011, 7:51pm UTC](https://www.ruby-forum.com/t/time-tracing-in-nginx/206421 "2011-04-30T19:51:58Z")

</div>

Hi I get some incoming requests that take longer to complete than others for no particular reason that I can see (goes from 0.03s to above 1s for the exact same file from the exact same host) Is there any way to add …

---

## [Nginx Proxy + Apache and php5 as apache module SERVER\_ADDR problem (HELP!)](https://www.ruby-forum.com/t/nginx-proxy-apache-and-php5-as-apache-module-server-addr-problem-help/197635)

<div class="topic-metadata">

**Author:** [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Replies:** 16\
**Last updated:** [April 30, 2011, 12:14pm UTC](https://www.ruby-forum.com/t/nginx-proxy-apache-and-php5-as-apache-module-server-addr-problem-help/197635 "2011-04-30T12:14:18Z")

</div>

Hi, First of all, my setup: Debian 5 Apache 2, Nginx 0.6.32 as Proxy PHP 5 as Apache module All installed via apt And, (important data), the server handles 5 different ips wich are distributed among several websi…

---

## [504 gateway timeout](https://www.ruby-forum.com/t/504-gateway-timeout/206408)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [April 30, 2011, 1:25am UTC](https://www.ruby-forum.com/t/504-gateway-timeout/206408 "2011-04-30T01:25:29Z")

</div>

Hello, we are using Nginx + PHP FPM for the first time. We run Nginx on a server with Plesk, which forced us to give Nginx the identification of “Apache”, so that Plesk is allowing this change. (Sorry… ;-)) So far …

---

## [Signing Amazon SDB requests](https://www.ruby-forum.com/t/signing-amazon-sdb-requests/206323)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [April 29, 2011, 6:09pm UTC](https://www.ruby-forum.com/t/signing-amazon-sdb-requests/206323 "2011-04-29T18:09:50Z")

</div>

I am looking for some advice on the recommended way of achieving the following. I need to sign Amazon Simple Database (SDB) queries with our Amazon Web Services credentials before forwarding them to upstream Amazon’s …

---

## [Try\_files Wordpress search](https://www.ruby-forum.com/t/try-files-wordpress-search/206379)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [April 29, 2011, 3:40pm UTC](https://www.ruby-forum.com/t/try-files-wordpress-search/206379 "2011-04-29T15:40:26Z")

</div>

I recently switched from using if rules for wordpress “pretty” url rewriting to the preffered try\_files directive. I used the configuration set out on this (http://elivz.com/blog/single/wordpress\_with\_w3tc\_on\_nginx/) …

---

## [Fastcgi\_cache\_key and empty $content\_type in cache](https://www.ruby-forum.com/t/fastcgi-cache-key-and-empty-content-type-in-cache/206377)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [April 29, 2011, 3:33pm UTC](https://www.ruby-forum.com/t/fastcgi-cache-key-and-empty-content-type-in-cache/206377 "2011-04-29T15:33:39Z")

</div>

Have a strange behavior of fastcgi cache, the variable $content\_type does not passes to the cache KEY, configuration: … location ~ .php$ { fastcgi\_cache cache; fastcgi\_cache\_key “$content\_type|$request\_method|$is\_a…

---

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

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 9\
**Last updated:** [April 29, 2011, 3:03pm UTC](https://www.ruby-forum.com/t/proxy-cache/206166 "2011-04-29T15:03:58Z")

</div>

Hi Is there a way to know if a file has been cached/is currently being downloaded to cache without requesting the file? I.e. can I query the cache table somehow? I am trying to stop new files being written multiple t…

---

## [Compile MySql with Nginx](https://www.ruby-forum.com/t/compile-mysql-with-nginx/206336)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 5\
**Last updated:** [April 29, 2011, 12:48pm UTC](https://www.ruby-forum.com/t/compile-mysql-with-nginx/206336 "2011-04-29T12:48:40Z")

</div>

Hello Everyone, Tough I have moderate C programming skills, I.m kindy new to linux&nginx development, so please excuse any nub questions… Im having a problem linking mysql client libraries with nginx, libraries are t…

---

## [Need help with nginx rewrites (for sub-domains)](https://www.ruby-forum.com/t/need-help-with-nginx-rewrites-for-sub-domains/206361)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [April 29, 2011, 12:35pm UTC](https://www.ruby-forum.com/t/need-help-with-nginx-rewrites-for-sub-domains/206361 "2011-04-29T12:35:50Z")

</div>

Hello, I have been scratching my head last 2 days trying to get this working: I have a Rails application, say, http://example.com and now I want to run a PHP app on http://example.com/coupons I set up the PHP app but…

---

## [PHP dead pages with php-fpm and nginx](https://www.ruby-forum.com/t/php-dead-pages-with-php-fpm-and-nginx/206260)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [April 28, 2011, 8:14pm UTC](https://www.ruby-forum.com/t/php-dead-pages-with-php-fpm-and-nginx/206260 "2011-04-28T20:14:14Z")

</div>

Hi all, I noticed today some weird errors when I tried to refresh a basic php page (phpinfo() function). The page loads fine when I click refresh several times, then all of the sudden I get a dead page, no 404, no Ng…

---

## [Need help to convert rewrite url apache's](https://www.ruby-forum.com/t/need-help-to-convert-rewrite-url-apaches/206247)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [April 28, 2011, 7:43am UTC](https://www.ruby-forum.com/t/need-help-to-convert-rewrite-url-apaches/206247 "2011-04-28T07:43:48Z")

</div>

Hi All, I’am new user, so actually I test NGinX in my labs for delete apache2 in my production webserver. I’ve small htaccess rules and I want to convert it in NGinX rewrite rule. RewriteRule ^$ index.html \[QSA\] Rew…

---

## [Nginx missing response header on 400 bad request](https://www.ruby-forum.com/t/nginx-missing-response-header-on-400-bad-request/206280)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [April 27, 2011, 6:10am UTC](https://www.ruby-forum.com/t/nginx-missing-response-header-on-400-bad-request/206280 "2011-04-27T06:10:43Z")

</div>

nginx does not sent the response headers but only response body on 400 bad request. e.g. $ nc 127.0.0.1 80 GET HTTP/1.0 400 Bad Request 400 Bad Request nginx/0.9.1 Posted at Nginx Forum:

---

## [Nginx as reverse proxy for many domains (many ips in proxypass?)](https://www.ruby-forum.com/t/nginx-as-reverse-proxy-for-many-domains-many-ips-in-proxypass/206265)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [April 27, 2011, 2:19am UTC](https://www.ruby-forum.com/t/nginx-as-reverse-proxy-for-many-domains-many-ips-in-proxypass/206265 "2011-04-27T02:19:01Z")

</div>

Hi, I’m trying to set up nginx as a reverse proxy for several apache2 server. Nginx server should act as a cache / proxy for any URL that you send - so some sort of global VirtualHost. There is no problem. But I do…

---

## [Too large file called "on" in nginx installation folder on windows](https://www.ruby-forum.com/t/too-large-file-called-on-in-nginx-installation-folder-on-windows/206235)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [April 26, 2011, 11:53am UTC](https://www.ruby-forum.com/t/too-large-file-called-on-in-nginx-installation-folder-on-windows/206235 "2011-04-26T11:53:53Z")

</div>

Im using Nginx Version : 0.8.54 running on Windows 2003. Its being used to server large number of static files with filesize varying from 10 kb to couple of mb in size. Nginx creates file called “on” in installation f…

---

## [Need to convert this small htaccess code for seo url's](https://www.ruby-forum.com/t/need-to-convert-this-small-htaccess-code-for-seo-urls/206213)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [April 26, 2011, 3:52am UTC](https://www.ruby-forum.com/t/need-to-convert-this-small-htaccess-code-for-seo-urls/206213 "2011-04-26T03:52:23Z")

</div>

This is htaccess: RewriteEngine On RewriteBase / RewriteCond %{REQUEST\_FILENAME} !-f RewriteCond %{REQUEST\_FILENAME} !-d RewriteRule . /index.php \[L\] And this is what i got for nginx but not sure is it ok: if …

---

## [Segfault in perl module's r-\>print](https://www.ruby-forum.com/t/segfault-in-perl-modules-r-print/206192)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [April 25, 2011, 10:56pm UTC](https://www.ruby-forum.com/t/segfault-in-perl-modules-r-print/206192 "2011-04-25T22:56:25Z")

</div>

Using $r-\>print() in nginx1.0’s perl module leads to a segfault. The problem appears to be in nginx-land, not perl land. I am using the first example listed on http://wiki.nginx.org/EmbeddedPerlModule - this example w…

---

## [Nginx will return 499 when php is too busy](https://www.ruby-forum.com/t/nginx-will-return-499-when-php-is-too-busy/206178)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [April 25, 2011, 9:11pm UTC](https://www.ruby-forum.com/t/nginx-will-return-499-when-php-is-too-busy/206178 "2011-04-25T21:11:54Z")

</div>

123.150.182.101 - - \[24/Apr/2011:00:15:03 +0800\] “GET /plus/qzhlove.php?do=1&t=0.7795113758845088 HTTP/1.1” 499 0 “NameBright - Domain Expired” “-” - 218.29.216.133 - - \[24/Apr/2011:00:15:06 +0800\] “GET /js/tuijian.ph…

---

## [How to cache pages that are mostly static but has a "logged in" bar?](https://www.ruby-forum.com/t/how-to-cache-pages-that-are-mostly-static-but-has-a-logged-in-bar/206177)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [April 25, 2011, 4:08am UTC](https://www.ruby-forum.com/t/how-to-cache-pages-that-are-mostly-static-but-has-a-logged-in-bar/206177 "2011-04-25T04:08:24Z")

</div>

I have pages that are generated dynamically but don’t change all that often. Would like to use Nginx to cache those pages. However every page has a “log in” bar at the top, similar to this forum. A logged-in user woul…

---

## [How to turn off fastcgi\_buffer](https://www.ruby-forum.com/t/how-to-turn-off-fastcgi-buffer/206159)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [April 24, 2011, 4:52pm UTC](https://www.ruby-forum.com/t/how-to-turn-off-fastcgi-buffer/206159 "2011-04-24T16:52:11Z")

</div>

thx in advance first. i need to turn off the fastcgi\_buffer so that my php application could flush content directly to the client. i googled this topic but nothing really meanning for. i tried to set fastcgi\_buffer\_s…

---

## [Question about memcache](https://www.ruby-forum.com/t/question-about-memcache/206075)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [April 23, 2011, 7:49am UTC](https://www.ruby-forum.com/t/question-about-memcache/206075 "2011-04-23T07:49:48Z")

</div>

Hello, I am trying to add memcache module in Nginx. Following http://wiki.nginx.org/NginxHttpMemcachedModule In Levent’s blog, in the end, he mentioned "Nginx’s memcache module never put anything automatically in m…

---

## [Webdav PUT is slow](https://www.ruby-forum.com/t/webdav-put-is-slow/206127)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [April 23, 2011, 1:01am UTC](https://www.ruby-forum.com/t/webdav-put-is-slow/206127 "2011-04-23T01:01:02Z")

</div>

I want to replace scp’ing files with doing a http PUT to decrease cpu usage. What I’ve noticed is that doing a PUT is noticeable slower then scp. Its between 5-10% slower. I’m using curl and the -T option to test the …

---

## [Nginx fiasco](https://www.ruby-forum.com/t/nginx-fiasco/206109)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 0\
**Last updated:** [April 22, 2011, 10:39am UTC](https://www.ruby-forum.com/t/nginx-fiasco/206109 "2011-04-22T10:39:37Z")

</div>

Hey guys, I am giving out the apache rewrite config and the config i wrote for nginx. I am not able to get the rewrite rules to work. Please help me get rid of the problem. Some other useful details : the apache r…

---

## [User directive warning, despite being run as root](https://www.ruby-forum.com/t/user-directive-warning-despite-being-run-as-root/206074)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [April 21, 2011, 10:00pm UTC](https://www.ruby-forum.com/t/user-directive-warning-despite-being-run-as-root/206074 "2011-04-21T22:00:54Z")

</div>

I’m running nginx 1.0.0 on a MacOS X machine, installed with brew, and when I launch nginx, even with sudo, I get the following warning in my log file over and over again: 4/21/11 2:03:42 AM org.nginx\[3788\] nginx: \[w…

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

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