# Server

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

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

---

## ["Hello, world!" from Lua file?](https://www.ruby-forum.com/t/hello-world-from-lua-file/238748)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 6\
**Last updated:** [January 28, 2014, 9:19pm UTC](https://www.ruby-forum.com/t/hello-world-from-lua-file/238748 "2014-01-28T21:19:22Z")

</div>

Hello Now that I have a working Nginx with the ngx\_lua module, I’d like to start learning how to write web scripts. The following page doesn’t have a basic sample: So I used the following… … to edit nginx.conf an…

---

## [Configuration not working](https://www.ruby-forum.com/t/configuration-not-working/238774)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [January 28, 2014, 1:25pm UTC](https://www.ruby-forum.com/t/configuration-not-working/238774 "2014-01-28T13:25:35Z")

</div>

Hello, I am running Nginx 1.3.0 on CentOS. It serves several domains. Yesterday we tried to change the allowed URIs to access one folder specific to one domain. After the config file change we tried the “nginx -s rel…

---

## [X-Frame-Options: Nginx includes header twice](https://www.ruby-forum.com/t/x-frame-options-nginx-includes-header-twice/238714)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 5\
**Last updated:** [January 28, 2014, 12:44pm UTC](https://www.ruby-forum.com/t/x-frame-options-nginx-includes-header-twice/238714 "2014-01-28T12:44:05Z")

</div>

I’m running Nginx 1.4.4 on Ubuntu 12.04 and have added the X-Frame-Options header for one of my sites but in testing it appears that Nginx includes this itself in addition to user configured headers. Basically I want …

---

## [Nginx seems to proxy only http GET](https://www.ruby-forum.com/t/nginx-seems-to-proxy-only-http-get/238752)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 4\
**Last updated:** [January 28, 2014, 12:18pm UTC](https://www.ruby-forum.com/t/nginx-seems-to-proxy-only-http-get/238752 "2014-01-28T12:18:20Z")

</div>

Hi, I’m using nginx to offload https to http. That works well but in my backend only GET Requests seem to get through. For all POST, PUT and DELETE I only receive a Status 400 with conten “HTTP method POST is not sup…

---

## [Problem Running WEBrick server in aptana RadRails](https://www.ruby-forum.com/t/problem-running-webrick-server-in-aptana-radrails/238770)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [January 28, 2014, 11:54am UTC](https://www.ruby-forum.com/t/problem-running-webrick-server-in-aptana-radrails/238770 "2014-01-28T11:54:43Z")

</div>

This is the error i got when i attempt to run webrick server in aptana radrails … “5220” C:/Ruby193/lib/ruby/site\_ruby/1.9.1/rubygems/custom\_require.rb:36:in \`require’: iconv will be deprecated in the future, use Str…

---

## [Issue with multipart response compression](https://www.ruby-forum.com/t/issue-with-multipart-response-compression/238623)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 3\
**Last updated:** [January 28, 2014, 7:57am UTC](https://www.ruby-forum.com/t/issue-with-multipart-response-compression/238623 "2014-01-28T07:57:36Z")

</div>

Hello I use Nginx/1.4.4 as a reverse proxy and my backend webserver generates multipart response with some dynamic boundary. I use nginx gzip module to send compress data to the client but it is unable to compress th…

---

## [Applying NGINX location based on unlisted extension of default file?](https://www.ruby-forum.com/t/applying-nginx-location-based-on-unlisted-extension-of-default-file/238755)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [January 27, 2014, 6:51pm UTC](https://www.ruby-forum.com/t/applying-nginx-location-based-on-unlisted-extension-of-default-file/238755 "2014-01-27T18:51:43Z")

</div>

I’m trying to create a second location in NGINX that will only fire for a specific file type. Specifically, I have NGINX acting as a proxy for a server that primarily serves PHP files. There are, however, a bunch of …

---

## [Proxy\_cache\_methods OPTIONS;](https://www.ruby-forum.com/t/proxy-cache-methods-options/238713)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 5\
**Last updated:** [January 27, 2014, 4:20pm UTC](https://www.ruby-forum.com/t/proxy-cache-methods-options/238713 "2014-01-27T16:20:33Z")

</div>

Is it possible to cache the OPTIONS method? This pages gives exactly that example: Search | Packt Subscription proxy\_cache\_methods OPTIONS; However, when I try this, nginx writes in the error log: \[warn\] 7243#0: inva…

---

## [How to start Nginx?](https://www.ruby-forum.com/t/how-to-start-nginx/238707)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 7\
**Last updated:** [January 27, 2014, 1:56pm UTC](https://www.ruby-forum.com/t/how-to-start-nginx/238707 "2014-01-27T13:56:05Z")

</div>

Hello Using OpenResty, I compiled and installed a Lua-capable Nginx in /tmp so I could experiment with it before replacing the current Nginx that was installed through apt-get. However, since files are located in n…

---

## [Modifying the request body](https://www.ruby-forum.com/t/modifying-the-request-body/238732)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [January 27, 2014, 1:38pm UTC](https://www.ruby-forum.com/t/modifying-the-request-body/238732 "2014-01-27T13:38:13Z")

</div>

I have nginx deployed as a proxy server. The client sends a POST request which needs to be modified before forwarding it to the origin server. Is there any module / filter available in nginx. The best I could find was …

---

## [How can i compile nginx with specific lib linkage](https://www.ruby-forum.com/t/how-can-i-compile-nginx-with-specific-lib-linkage/238697)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 2\
**Last updated:** [January 27, 2014, 11:59am UTC](https://www.ruby-forum.com/t/how-can-i-compile-nginx-with-specific-lib-linkage/238697 "2014-01-27T11:59:49Z")

</div>

I have customized a new nginx add on module,and the module use an external lib ( mytest.so). The method i called in mytest.so is kimtest method. How can i configure the ./configure file and Makefile to prevent the e…

---

## [Implementing CONNECT in nginx](https://www.ruby-forum.com/t/implementing-connect-in-nginx/238658)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 3\
**Last updated:** [January 27, 2014, 3:47am UTC](https://www.ruby-forum.com/t/implementing-connect-in-nginx/238658 "2014-01-27T03:47:38Z")

</div>

Hello everyone, I would like to extend nginx with a CONNECT statement which connects to a TCP socket. Could someone walk me through which source files I need to modify and which fucntions I should have a look at? Or …

---

## [Nginx Tweaks for JBoss](https://www.ruby-forum.com/t/nginx-tweaks-for-jboss/238739)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [January 27, 2014, 1:12am UTC](https://www.ruby-forum.com/t/nginx-tweaks-for-jboss/238739 "2014-01-27T01:12:22Z")

</div>

Hello Gurus, It’s been several years since I’ve revisited anything but the most basic changes to our Nginx reverse-proxy front-end. I’m wondering if there have been any new tweaks or security related configuration ch…

---

## [Nginx and cgit - upstream prematurely closed FastCGI stdout](https://www.ruby-forum.com/t/nginx-and-cgit-upstream-prematurely-closed-fastcgi-stdout/238726)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 2\
**Last updated:** [January 26, 2014, 10:23pm UTC](https://www.ruby-forum.com/t/nginx-and-cgit-upstream-prematurely-closed-fastcgi-stdout/238726 "2014-01-26T22:23:37Z")

</div>

I’m trying to setup cgit 0.10 with nginx 1.2.1-2.2 and fastcgi 1.0.3-3. Unfortunately the reponse is a 502. The following message is written in the error.log: \[error\] 30956#0: \*1 upstream prematurely closed FastCGI st…

---

## [Nginx not starting with named pipe (fifo) for access\_log](https://www.ruby-forum.com/t/nginx-not-starting-with-named-pipe-fifo-for-access-log/238307)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [January 26, 2014, 5:55pm UTC](https://www.ruby-forum.com/t/nginx-not-starting-with-named-pipe-fifo-for-access-log/238307 "2014-01-26T17:55:32Z")

</div>

Heya, there seems to be a issue with Nginx and named pipes (fifo). Tested nginx versions: 1.1.19 (Ubuntu 12.04.3 LTS amd64) 1.4.4 (Ubuntu 12.04.3 LTS amd64 with PPA NGINX Stable : “Nginx” team ) 1.4.4 (CentOS 6.5 am…

---

## [Using 2 intersection of conditions for proxy\_cache\_bypass (avoiding logical if/and)](https://www.ruby-forum.com/t/using-2-intersection-of-conditions-for-proxy-cache-bypass-avoiding-logical-if-and/238711)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 6\
**Last updated:** [January 26, 2014, 4:27am UTC](https://www.ruby-forum.com/t/using-2-intersection-of-conditions-for-proxy-cache-bypass-avoiding-logical-if-and/238711 "2014-01-26T04:27:16Z")

</div>

I use nginx to cache both GET and POST requests. I want to use proxy\_cache\_bypass to allow users to bypass the cache, but ONLY for GET requests. POST requests should always be cached. I tried this: map $request\_method…

---

## [SSL behaviour with multiple server blocks for same port](https://www.ruby-forum.com/t/ssl-behaviour-with-multiple-server-blocks-for-same-port/238684)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 5\
**Last updated:** [January 24, 2014, 12:23pm UTC](https://www.ruby-forum.com/t/ssl-behaviour-with-multiple-server-blocks-for-same-port/238684 "2014-01-24T12:23:38Z")

</div>

Hi, I am struggling to get any documented reference for my problem in nginx docs. Hope someone can help before I delve into nginx code: I want to have multiple server blocks for the https port 443, they will serve di…

---

## [Images Aren't Displaying When Perl Interpreter Is Enabled](https://www.ruby-forum.com/t/images-arent-displaying-when-perl-interpreter-is-enabled/238544)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 5\
**Last updated:** [January 24, 2014, 9:59am UTC](https://www.ruby-forum.com/t/images-arent-displaying-when-perl-interpreter-is-enabled/238544 "2014-01-24T09:59:39Z")

</div>

I have awstats set up and working with Nginx and perl but all images return a 404 error. The virtual host config is identical to other websites where images work fine except for the added part for perl. I think i kn…

---

## [Understanding location blocks and try files](https://www.ruby-forum.com/t/understanding-location-blocks-and-try-files/238661)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 9\
**Last updated:** [January 23, 2014, 12:56pm UTC](https://www.ruby-forum.com/t/understanding-location-blocks-and-try-files/238661 "2014-01-23T12:56:08Z")

</div>

Hi, I’m trying to understand a problem I’m facing in a typical frontend-controller application. I’ve setup a test config with a single simple server \[1\], and ran a test script with debugging enabled to show what happ…

---

## [Count errors by http code](https://www.ruby-forum.com/t/count-errors-by-http-code/238681)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [January 23, 2014, 12:20pm UTC](https://www.ruby-forum.com/t/count-errors-by-http-code/238681 "2014-01-23T12:20:02Z")

</div>

Hello all, I guess this is not the first time you hear this question : I would like to know if there’s a way to setup counters on http codes. I know this is feasable with some kind log analyser like splunk or logstas…

---

## [Nginx-1.5.9](https://www.ruby-forum.com/t/nginx-1-5-9/238656)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [January 23, 2014, 10:58am UTC](https://www.ruby-forum.com/t/nginx-1-5-9/238656 "2014-01-23T10:58:53Z")

</div>

Changes with nginx 1.5.9 22 Jan 2014 \*) Change: now nginx expects escaped URIs in "X-Accel-Redirect" headers. \*) Feature: the "ssl\_buffer\_size" directive. \*) Feature: the "li…

---

## [What is the right place for sub\_filter?](https://www.ruby-forum.com/t/what-is-the-right-place-for-sub-filter/238677)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [January 23, 2014, 7:58am UTC](https://www.ruby-forum.com/t/what-is-the-right-place-for-sub-filter/238677 "2014-01-23T07:58:19Z")

</div>

Hi! My site runs php-cgi (via fastcgi) & nginx 1.4.4. I need to replace www.domain refs to www1.domain ones. Where to place sub\_filter - in server{}, or “location /”, or “location ~ .php$”,…? sub\_filter www.domain w…

---

## [Logging $ssl\_session\_id can crash Nginx 1.5.9 worker](https://www.ruby-forum.com/t/logging-ssl-session-id-can-crash-nginx-1-5-9-worker/238664)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 4\
**Last updated:** [January 22, 2014, 10:49pm UTC](https://www.ruby-forum.com/t/logging-ssl-session-id-can-crash-nginx-1-5-9-worker/238664 "2014-01-22T22:49:27Z")

</div>

I run the nginx.org mainline packages on Ubuntu 12.04, 32- and 64-bit. I use a wacky custom log format, and after 1.5.9 was released today, I enabled logging the $ssl\_session\_id variable. I later ran an SSL Labs SSL S…

---

## [Trying to set-up a local development environment](https://www.ruby-forum.com/t/trying-to-set-up-a-local-development-environment/238649)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [January 22, 2014, 10:19am UTC](https://www.ruby-forum.com/t/trying-to-set-up-a-local-development-environment/238649 "2014-01-22T10:19:56Z")

</div>

I am a complete newbie to the server side of things. My background has been installing wamp (WampServer, la plate-forme de développement Web sous Windows - Apache, MySQL, PHP), dumping files into the www folder, and te…

---

## [Re: proxy\_redirect can't be def'd in an include file; ok in main config?](https://www.ruby-forum.com/t/re-proxy-redirect-cant-be-defd-in-an-include-file-ok-in-main-config/238646)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [January 22, 2014, 2:05am UTC](https://www.ruby-forum.com/t/re-proxy-redirect-cant-be-defd-in-an-include-file-ok-in-main-config/238646 "2014-01-22T02:05:40Z")

</div>

On Tue, Jan 21, 2014, at 11:10 AM, Maxim D. wrote: … And it’s certainly a wrong list to write such questions. Thank you for cooperation. … location / { I get an error location / { … Most likely, there are o…

---

## [Rewriting GET request parameters while configured as a reverse proxy](https://www.ruby-forum.com/t/rewriting-get-request-parameters-while-configured-as-a-reverse-proxy/238644)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [January 21, 2014, 11:25pm UTC](https://www.ruby-forum.com/t/rewriting-get-request-parameters-while-configured-as-a-reverse-proxy/238644 "2014-01-21T23:25:41Z")

</div>

Hello Is there a way to make nginx rewrite the GET request parameters while configured as a reverse proxy. e.g. if nginx receives a request GET / foo.html?abc=123 , can nginx rewrite it to GET /foo.html?abc=456 (nginx …

---

## [Bounty for #416](https://www.ruby-forum.com/t/bounty-for-416/238511)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 2\
**Last updated:** [January 21, 2014, 8:55pm UTC](https://www.ruby-forum.com/t/bounty-for-416/238511 "2014-01-21T20:55:48Z")

</div>

Like the ticket creator says in the description, always serving cached versions of pages would be extremely cool, so I wanted to let people know I just offered a $500 bounty for #416 (proxy\_cache\_use\_stale run updatin…

---

## [Nested location block for merging config returns 404?](https://www.ruby-forum.com/t/nested-location-block-for-merging-config-returns-404/238632)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 6\
**Last updated:** [January 21, 2014, 3:11pm UTC](https://www.ruby-forum.com/t/nested-location-block-for-merging-config-returns-404/238632 "2014-01-21T15:11:30Z")

</div>

I want a location to proxy to another service, and need to add an extra header for certain file types, but when trying to merge the configuration with a nested location instead of duplicating nginx instead returns a …

---

## [Imap proxy limited to about 210 connections](https://www.ruby-forum.com/t/imap-proxy-limited-to-about-210-connections/238622)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [January 21, 2014, 12:40pm UTC](https://www.ruby-forum.com/t/imap-proxy-limited-to-about-210-connections/238622 "2014-01-21T12:40:19Z")

</div>

I have nginx proxying imap and pop between 3 different backend servers, but it seems to be limited to about 210 concurrent connections. Requests beyond this get a connection timed out. I tried adding more worker pr…

---

## [Help required in Setting up FTP Load Balancer in NGINX-](https://www.ruby-forum.com/t/help-required-in-setting-up-ftp-load-balancer-in-nginx/238625)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [January 21, 2014, 11:45am UTC](https://www.ruby-forum.com/t/help-required-in-setting-up-ftp-load-balancer-in-nginx/238625 "2014-01-21T11:45:50Z")

</div>

I required help to configure FTP Load balancer in NGINX. Can you all please help me with the necessary steps or any link which explains the same. Note: My incoming FTP request will come in FTP protocol only. We canno…

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

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