# Server

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

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

---

## [Inconsistency in ability to use variables in nginx config](https://www.ruby-forum.com/t/inconsistency-in-ability-to-use-variables-in-nginx-config/237434)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [November 13, 2013, 11:16am UTC](https://www.ruby-forum.com/t/inconsistency-in-ability-to-use-variables-in-nginx-config/237434 "2013-11-13T11:16:35Z")

</div>

It seems like it’s possible to use variables in some configuration directives but not in others. This works: root /usr/www/$sitename/httpdocs; works, while these: access\_log /var/log/www/$sitename/access.log; proxy\_…

---

## [Getting things humming on a 4 gig server](https://www.ruby-forum.com/t/getting-things-humming-on-a-4-gig-server/237437)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [November 13, 2013, 7:56am UTC](https://www.ruby-forum.com/t/getting-things-humming-on-a-4-gig-server/237437 "2013-11-13T07:56:14Z")

</div>

Will soon be migrating from a 2 gig CentOS server to a 4 Gig Ubuntu. We’ll be running nginx (of course), php-fpm, the fastcgi cache, MariaDB and Zend Opcache. Though I realize that 4 gigs of RAM is still modest, it is…

---

## [Ngx\_openresty stable version 1.4.3.4 released](https://www.ruby-forum.com/t/ngx-openresty-stable-version-1-4-3-4-released/237433)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [November 13, 2013, 7:13am UTC](https://www.ruby-forum.com/t/ngx-openresty-stable-version-1-4-3-4-released/237433 "2013-11-13T07:13:00Z")

</div>

Hello folks! I am happy to announce that the new stable version of ngx\_openresty, 1.4.3.4, is now released: http://openresty.org/#Download Special thanks go to my employer, CloudFlare, for supporting the development…

---

## [Re: Handler invokation after upstream server being picked](https://www.ruby-forum.com/t/re-handler-invokation-after-upstream-server-being-picked/237426)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [November 12, 2013, 10:37pm UTC](https://www.ruby-forum.com/t/re-handler-invokation-after-upstream-server-being-picked/237426 "2013-11-12T22:37:22Z")

</div>

can help a little with the code. but instead its value becomes known when proxy module starts working with a request. Ok. Sorry - I saw in the proxy code that ngx\_http\_proxy\_set\_vars() is called inside the proxy\_…

---

## [Re: Handler invokation after upstream server being picked](https://www.ruby-forum.com/t/re-handler-invokation-after-upstream-server-being-picked/237417)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [November 12, 2013, 4:38pm UTC](https://www.ruby-forum.com/t/re-handler-invokation-after-upstream-server-being-picked/237417 "2013-11-12T16:38:02Z")

</div>

Maxim, a while ago you replied to my question below. Since yesterday I am trying to get hold of the proxy\_host variable set by the proxy module but without success, maybe you can help a little with the code. From th…

---

## [Partial urlEncoding when using if and $request\_uri](https://www.ruby-forum.com/t/partial-urlencoding-when-using-if-and-request-uri/237398)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 4\
**Last updated:** [November 11, 2013, 5:36pm UTC](https://www.ruby-forum.com/t/partial-urlencoding-when-using-if-and-request-uri/237398 "2013-11-11T17:36:14Z")

</div>

Hi, I have observed strange behavior with nginx rewrites. What happens: I get request going to myserver.com/appID/path1/path2/uglyID and I need to proxy this to appID.backend.internal/path1/path2/uglyID. The uglyID …

---

## [Filtering out long (invalid) hostnames](https://www.ruby-forum.com/t/filtering-out-long-invalid-hostnames/237383)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [November 11, 2013, 2:10pm UTC](https://www.ruby-forum.com/t/filtering-out-long-invalid-hostnames/237383 "2013-11-11T14:10:32Z")

</div>

Recently we have seen some kind of hacker attempt on our hosting servers, passing very long hostnames in the HTTP Host: header. That means length(hostname) was higher than 2000, for few requests even more than 10000. …

---

## [File Checking Rewriting and Handing off to Back End](https://www.ruby-forum.com/t/file-checking-rewriting-and-handing-off-to-back-end/237367)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 2\
**Last updated:** [November 11, 2013, 12:09am UTC](https://www.ruby-forum.com/t/file-checking-rewriting-and-handing-off-to-back-end/237367 "2013-11-11T00:09:53Z")

</div>

Hi All, We’re starting to make more and more heavy use of Nginx having shifted from Apache, mostly in handing off to backends running Puma and php-fpm. However, wherever possible we naturally want Nginx to serve what …

---

## [PHP via FastCGI in / and sub-directory location w/ different roots](https://www.ruby-forum.com/t/php-via-fastcgi-in-and-sub-directory-location-w-different-roots/237347)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 2\
**Last updated:** [November 8, 2013, 11:24pm UTC](https://www.ruby-forum.com/t/php-via-fastcgi-in-and-sub-directory-location-w-different-roots/237347 "2013-11-08T23:24:37Z")

</div>

Hi there, I am currently somewhat stuck getting the following setup up and running: I have one PHP web application residing in /usr/share/a that I’d like to have available at /. This works as expected. I have a seco…

---

## [499s and repeated requests](https://www.ruby-forum.com/t/499s-and-repeated-requests/237342)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [November 7, 2013, 11:27am UTC](https://www.ruby-forum.com/t/499s-and-repeated-requests/237342 "2013-11-07T11:27:37Z")

</div>

So, I’m running a rather standard nginx → unicorn → rails application, all over HTTPS. Recently, I started looking into some strange load bursts (which have been going on for a while but are getting more important), …

---

## [Ngx\_openresty mainline version 1.4.3.3 released](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-3-released/237341)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [November 7, 2013, 12:15am UTC](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-3-released/237341 "2013-11-07T00:15:48Z")

</div>

Hello guys! I am happy to announce that the new mainline version of ngx\_openresty, 1.4.3.3, is now released: http://openresty.org/#Download Special thanks go to all the contributors for making this happen! Below is …

---

## [Define a proxy for Nginx](https://www.ruby-forum.com/t/define-a-proxy-for-nginx/237294)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 8\
**Last updated:** [November 6, 2013, 10:40am UTC](https://www.ruby-forum.com/t/define-a-proxy-for-nginx/237294 "2013-11-06T10:40:40Z")

</div>

Hello, My Nginx servers are behind a proxy. Some PHP apps need to reach external web sites (for RSS feeds for example). I’ve tried this in nginx.conf : env http\_proxy=http://myproxy:port but there is no effect. How…

---

## [Nginx 1.2.7 + Apache2 2.2.24 on Freebsd 9.1 speedtest mini hosting upload speed problem](https://www.ruby-forum.com/t/nginx-1-2-7-apache2-2-2-24-on-freebsd-9-1-speedtest-mini-hosting-upload-speed-problem/237322)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [November 6, 2013, 9:50am UTC](https://www.ruby-forum.com/t/nginx-1-2-7-apache2-2-2-24-on-freebsd-9-1-speedtest-mini-hosting-upload-speed-problem/237322 "2013-11-06T09:50:26Z")

</div>

I have Nginx 1.2.7 + Apache2 2.2.24. Nginx config is default, no buffer sizes changed etc. I moved my speedtest mini host there and got problem with upload speed. Speedtest folder is on RAMdisk, so there is no problem…

---

## [Multiple ssl certificates within single server {} block](https://www.ruby-forum.com/t/multiple-ssl-certificates-within-single-server-block/237306)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 5\
**Last updated:** [November 5, 2013, 5:59pm UTC](https://www.ruby-forum.com/t/multiple-ssl-certificates-within-single-server-block/237306 "2013-11-05T17:59:56Z")

</div>

Hi I was wondering if there’s any way to have a configuration like this? server { listen 80; listen 443 ssl; ssl\_certificate www.example.com.cer; ssl\_certificate\_key www.example.com.key; …

---

## [Support for relative URL in Location header](https://www.ruby-forum.com/t/support-for-relative-url-in-location-header/237299)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 3\
**Last updated:** [November 5, 2013, 5:54pm UTC](https://www.ruby-forum.com/t/support-for-relative-url-in-location-header/237299 "2013-11-05T17:54:41Z")

</div>

HTTP status codes such as 201, 301, 302, etc rely on the HTTP Location header. The current standard of HTTP specifies that this URL must be absolute. However, all popular browsers will accept a relative URL, and it is…

---

## [How to use location before rewrite](https://www.ruby-forum.com/t/how-to-use-location-before-rewrite/237304)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [November 5, 2013, 8:35am UTC](https://www.ruby-forum.com/t/how-to-use-location-before-rewrite/237304 "2013-11-05T08:35:35Z")

</div>

I have a set of rewrite rules as rewrite ^/(.\*) /script.php?file=$1 last; location ~ .php$ { php proxy } but I want to make a few exceptions as location = file1|file2|file3 { static delivery } but rewrite will c…

---

## [Help needed with config](https://www.ruby-forum.com/t/help-needed-with-config/237300)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 2\
**Last updated:** [November 4, 2013, 8:24pm UTC](https://www.ruby-forum.com/t/help-needed-with-config/237300 "2013-11-04T20:24:05Z")

</div>

Hi, I’m baffled. What I want to do is to serve static and php files from one root if they exist there, and from another if they don’t, and give a 404 error if the file is in neither location. I have the following con…

---

## [Nginx http proxy support for backend server health checks / status monitoring url](https://www.ruby-forum.com/t/nginx-http-proxy-support-for-backend-server-health-checks-status-monitoring-url/237244)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 3\
**Last updated:** [November 4, 2013, 12:58pm UTC](https://www.ruby-forum.com/t/nginx-http-proxy-support-for-backend-server-health-checks-status-monitoring-url/237244 "2013-11-04T12:58:55Z")

</div>

Hello, I’m using nginx as a http proxy / loadbalancer for an application which which has the following setup on the backend servers: https/403 provides the application at: https://hostname-of-backend/app/ statu…

---

## [\-s reload does not update logfiles time, v1.5.6](https://www.ruby-forum.com/t/s-reload-does-not-update-logfiles-time-v1-5-6/237276)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [November 2, 2013, 4:51pm UTC](https://www.ruby-forum.com/t/s-reload-does-not-update-logfiles-time-v1-5-6/237276 "2013-11-02T16:51:13Z")

</div>

A -s reload works as documented, however while the logfiles are being written to, the logfiles keep their last (before -s) time/date. Is this a known issue? After a simple restart the logfiles are time updated as nor…

---

## [Honoring ETag of cached content](https://www.ruby-forum.com/t/honoring-etag-of-cached-content/237267)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 4\
**Last updated:** [November 2, 2013, 1:11pm UTC](https://www.ruby-forum.com/t/honoring-etag-of-cached-content/237267 "2013-11-02T13:11:36Z")

</div>

Hi, I’m using nginx proxy pass to cache content of our dynamic web application. In order to save some bandwidth our client application uses conditional requests based on ETag. However nginx ignores the ETag of cached…

---

## [Proxy\_pass not passing to dynamic $host](https://www.ruby-forum.com/t/proxy-pass-not-passing-to-dynamic-host/237250)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 10\
**Last updated:** [November 2, 2013, 2:46am UTC](https://www.ruby-forum.com/t/proxy-pass-not-passing-to-dynamic-host/237250 "2013-11-02T02:46:01Z")

</div>

Hi, I need to do proxy\_pass to host name passed in url and rewrite url as well. Since the host name is difference with each request, I cannot provide an upstream for it. Below is the nginx configuration I am using bu…

---

## [SSI working on Apache backend, but not on gunicorn backend](https://www.ruby-forum.com/t/ssi-working-on-apache-backend-but-not-on-gunicorn-backend/237245)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 2\
**Last updated:** [November 1, 2013, 8:45am UTC](https://www.ruby-forum.com/t/ssi-working-on-apache-backend-but-not-on-gunicorn-backend/237245 "2013-11-01T08:45:50Z")

</div>

Hello, I have nginx in front of an Apache server and a gunicorn server for different parts of my website. I am using the SSI module in nginx to display a snippet in every page. The websites include a snippet in this …

---

## [SPDY, SSL termination and proxy\_pass](https://www.ruby-forum.com/t/spdy-ssl-termination-and-proxy-pass/237242)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [October 31, 2013, 1:30pm UTC](https://www.ruby-forum.com/t/spdy-ssl-termination-and-proxy-pass/237242 "2013-10-31T13:30:11Z")

</div>

I have setup SPDY on my application and have observed some nice reductions in page load times. However in a production environment my setup is somewhat different. At the moment my setup looks like this: server 1 ru…

---

## [Hi, agentzh, the chunkin-nginx-module is not compatible with nginx 1.5.x](https://www.ruby-forum.com/t/hi-agentzh-the-chunkin-nginx-module-is-not-compatible-with-nginx-1-5-x/237223)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 1\
**Last updated:** [October 30, 2013, 8:28pm UTC](https://www.ruby-forum.com/t/hi-agentzh-the-chunkin-nginx-module-is-not-compatible-with-nginx-1-5-x/237223 "2013-10-30T20:28:27Z")

</div>

Hi,agentzh, the chunkin-nginx-module is not compatible with nginx 1.5.x In nginx 1.5.3, the error when making is as follows: cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -DNDK\_SET\_VAR -DN…

---

## [Location problem with static content](https://www.ruby-forum.com/t/location-problem-with-static-content/237204)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 3\
**Last updated:** [October 30, 2013, 7:48pm UTC](https://www.ruby-forum.com/t/location-problem-with-static-content/237204 "2013-10-30T19:48:42Z")

</div>

Hello, I have created for my GitLab installation this entries in the configuration: location /gitlab { root /home/gitlab/gitlab/public; try\_files $uri $uri/index.html $uri.html @gitlab; } location @gitlab { …

---

## [Hi, agentzh, the chunkin-nginx-module is not compatible with nginx 1.5.x](https://www.ruby-forum.com/t/hi-agentzh-the-chunkin-nginx-module-is-not-compatible-with-nginx-1-5-x/237224)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 0\
**Last updated:** [October 30, 2013, 4:47pm UTC](https://www.ruby-forum.com/t/hi-agentzh-the-chunkin-nginx-module-is-not-compatible-with-nginx-1-5-x/237224 "2013-10-30T16:47:01Z")

</div>

Hi,agentzh, the chunkin-nginx-module is not compatible with nginx 1.5.x In nginx 1.5.3, the error when making is as follows: cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -DNDK\_SET\_VAR -DN…

---

## [Default virtual host overrides all other virtual hosts](https://www.ruby-forum.com/t/default-virtual-host-overrides-all-other-virtual-hosts/237216)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [October 30, 2013, 8:56am UTC](https://www.ruby-forum.com/t/default-virtual-host-overrides-all-other-virtual-hosts/237216 "2013-10-30T08:56:12Z")

</div>

hopefully someone can help, i’ve been trying to set up nginx with virtual hosts but the default host always overrides any of the others that i specify. here is my config file found in /etc/nginx/sites-enabled server…

---

## [Ngx\_openresty mainline version 1.4.3.1 released](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-1-released/237208)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [October 29, 2013, 9:50pm UTC](https://www.ruby-forum.com/t/ngx-openresty-mainline-version-1-4-3-1-released/237208 "2013-10-29T21:50:00Z")

</div>

Hello folks! I am pleased to announce that the new mainline version of ngx\_openresty, 1.4.3.1, is now released: http://openresty.org/#Download Special thanks go to all the contributors for making this happen! Below …

---

## [Alternative ssl](https://www.ruby-forum.com/t/alternative-ssl/217077)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [October 29, 2013, 5:57pm UTC](https://www.ruby-forum.com/t/alternative-ssl/217077 "2013-10-29T17:57:28Z")

</div>

Hi, NGINX dev team has been working with CyaSSL in regard to integrating this library as an alternative SSL engine: What would be opinions here in regards to what kind of an SSL is good to have with nginx? And what…

---

## [Minor misleading configure error-msg around PCRE](https://www.ruby-forum.com/t/minor-misleading-configure-error-msg-around-pcre/237194)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [October 29, 2013, 11:48am UTC](https://www.ruby-forum.com/t/minor-misleading-configure-error-msg-around-pcre/237194 "2013-10-29T11:48:48Z")

</div>

Hi, ./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using –without-http\_rewrite\_module option, or install the PCRE library into the system, or build the PCR…

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

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