# Server

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

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

---

## [Goto @loc; / return @loc;](https://www.ruby-forum.com/t/goto-loc-return-loc/246207)

<div class="topic-metadata">

**Author:** [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Replies:** 0\
**Last updated:** [September 11, 2013, 7:22am UTC](https://www.ruby-forum.com/t/goto-loc-return-loc/246207 "2013-09-11T07:22:56Z")

</div>

Hi Here is a simplified example of my nginx config location /loc1 { location ~ .(css|js)$ { try\_files $uri @loc1; } return 599; error\_page 599 = @loc1; } location @loc1 { fastcgi\_index index.aspx; # Page par de…

---

## [Secure permission structure for server blocks?](https://www.ruby-forum.com/t/secure-permission-structure-for-server-blocks/236506)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 2\
**Last updated:** [September 10, 2013, 7:13pm UTC](https://www.ruby-forum.com/t/secure-permission-structure-for-server-blocks/236506 "2013-09-10T19:13:20Z")

</div>

Hello everybody, I am trying to wrap my head around this for weeks now. What is the most secure way to organise the permissions of the web root directories (WRD) for several server blocks. Especially when you have PHP…

---

## [How to process Facebook signed request to determine proxy target?](https://www.ruby-forum.com/t/how-to-process-facebook-signed-request-to-determine-proxy-target/216810)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [September 10, 2013, 6:00pm UTC](https://www.ruby-forum.com/t/how-to-process-facebook-signed-request-to-determine-proxy-target/216810 "2013-09-10T18:00:18Z")

</div>

Hello all, we’re using a Nginx as proxy gateway to several customer specific apache instances on different servers. In order to determine where to route the traffic from a Facebook application, we need to extract the…

---

## [Upstart after nginx update not working](https://www.ruby-forum.com/t/upstart-after-nginx-update-not-working/236518)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 0\
**Last updated:** [September 10, 2013, 1:21pm UTC](https://www.ruby-forum.com/t/upstart-after-nginx-update-not-working/236518 "2013-09-10T13:21:40Z")

</div>

hi i’ve created the upstart with the following config nginx description “nginx http daemon” author “George S. removed\_email\_address@domain.invalid” start on (filesystem and net-device-up IFACE=lo) stop on runlevel …

---

## [How to solve the problem of "405 not allowed"?](https://www.ruby-forum.com/t/how-to-solve-the-problem-of-405-not-allowed/168901)

<div class="topic-metadata">

**Author:** [@peacock](https://www.ruby-forum.com/u/peacock)\
**Replies:** 21\
**Last updated:** [September 10, 2013, 9:28am UTC](https://www.ruby-forum.com/t/how-to-solve-the-problem-of-405-not-allowed/168901 "2013-09-10T09:28:09Z")

</div>

When I post when a JavaScript file, “405 not allowed” error will appear. if use proxy, it can work. error\_page 405 =200 @405; location @405 { root /htdocs; proxy\_pass http://localhost:8080;…

---

## [There are cosplay costumes which will make you more charming!](https://www.ruby-forum.com/t/there-are-cosplay-costumes-which-will-make-you-more-charming/236515)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [September 10, 2013, 5:49am UTC](https://www.ruby-forum.com/t/there-are-cosplay-costumes-which-will-make-you-more-charming/236515 "2013-09-10T05:49:31Z")

</div>

Cosplay costumes differ significantly and can range from simple designed costumes to extremely specific costumes. Cosplay is generally regarded different from Hallow’s eve and Mardi Gras costumes wear, as the objectiv…

---

## [Nginx update problem](https://www.ruby-forum.com/t/nginx-update-problem/236511)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 1\
**Last updated:** [September 9, 2013, 2:42pm UTC](https://www.ruby-forum.com/t/nginx-update-problem/236511 "2013-09-09T14:42:22Z")

</div>

When trying to update the nginx package on debian 8.0 jessie This is the error message Preparing to replace nginx 1.4.1-3 (using .../nginx\_1.4.2-1~squeeze\_amd64.deb) ... Unpacking replacement nginx ... dpkg: error proc…

---

## [Drupal clean urls](https://www.ruby-forum.com/t/drupal-clean-urls/236500)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 2\
**Last updated:** [September 9, 2013, 7:25am UTC](https://www.ruby-forum.com/t/drupal-clean-urls/236500 "2013-09-09T07:25:24Z")

</div>

Greetings I have followed all the instructions in the wiki, and when i set my drupal installations as the root, everything works, however, when i move my drupal into a folder i am able to get everything to work exce…

---

## [Ngx\_openresty devel version 1.4.2.5 released](https://www.ruby-forum.com/t/ngx-openresty-devel-version-1-4-2-5-released/236504)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [September 9, 2013, 2:23am UTC](https://www.ruby-forum.com/t/ngx-openresty-devel-version-1-4-2-5-released/236504 "2013-09-09T02:23:26Z")

</div>

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

---

## [Can i run nginx caching and http server on same box?(newbie)](https://www.ruby-forum.com/t/can-i-run-nginx-caching-and-http-server-on-same-box-newbie/246171)

<div class="topic-metadata">

**Author:** [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Replies:** 1\
**Last updated:** [September 8, 2013, 5:19pm UTC](https://www.ruby-forum.com/t/can-i-run-nginx-caching-and-http-server-on-same-box-newbie/246171 "2013-09-08T17:19:18Z")

</div>

can i run nginx caching and http server on same box? can i set caching per directory and/or per server block? how can i check what is actually being cached? logs? should i place php scripts outside root location? dis…

---

## [Turn off Nginx SPDY?](https://www.ruby-forum.com/t/turn-off-nginx-spdy/246191)

<div class="topic-metadata">

**Author:** [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Replies:** 2\
**Last updated:** [September 8, 2013, 1:57pm UTC](https://www.ruby-forum.com/t/turn-off-nginx-spdy/246191 "2013-09-08T13:57:10Z")

</div>

I want to test non-SPDY vs SPDY performance for Nginx and I have Nginx compiled with SPDY support and it’s enabled by adding to listen directive the spdy option as per Module ngx\_http\_spdy\_module. I thought that omi…

---

## [Using if statements in a location block with set](https://www.ruby-forum.com/t/using-if-statements-in-a-location-block-with-set/246162)

<div class="topic-metadata">

**Author:** [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Replies:** 0\
**Last updated:** [September 7, 2013, 1:43am UTC](https://www.ruby-forum.com/t/using-if-statements-in-a-location-block-with-set/246162 "2013-09-07T01:43:24Z")

</div>

Is the following going to work as expected: location /v1/users { rewrite ^/users/(.\*)/accounts$ /v1/users/$1/accounts break; if ($server\_name = 'js.mydomain.com') { set $backend "api.mydomain.com…

---

## [Best way to protect an http service with nginx (possibly encryption?)](https://www.ruby-forum.com/t/best-way-to-protect-an-http-service-with-nginx-possibly-encryption/236484)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [September 6, 2013, 11:46am UTC](https://www.ruby-forum.com/t/best-way-to-protect-an-http-service-with-nginx-possibly-encryption/236484 "2013-09-06T11:46:18Z")

</div>

Hi – I’m an nginx newbie who is looking to maybe use nginx to provide security for an HTTP service that previously ran in a trusted environment, but that now needs to run on the open web. I was thinking of having ngi…

---

## [Return file when it's in cache/check if file exists in cache](https://www.ruby-forum.com/t/return-file-when-its-in-cache-check-if-file-exists-in-cache/236433)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 1\
**Last updated:** [September 6, 2013, 10:49am UTC](https://www.ruby-forum.com/t/return-file-when-its-in-cache-check-if-file-exists-in-cache/236433 "2013-09-06T10:49:03Z")

</div>

I’m using ngnix as proxy server. There is a situation when backend server is down and I know about it. Thus I’m adding ‘Check-Cache’ header to request and what I want to do is get the file when it is in cache, and wh…

---

## [GY Ray Ban Zonnebril mensen moeten worden bezorgd over de kenmerken en de prijs of het wo](https://www.ruby-forum.com/t/gy-ray-ban-zonnebril-mensen-moeten-worden-bezorgd-over-de-kenmerken-en-de-prijs-of-het-wo/236479)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 0\
**Last updated:** [September 5, 2013, 11:35pm UTC](https://www.ruby-forum.com/t/gy-ray-ban-zonnebril-mensen-moeten-worden-bezorgd-over-de-kenmerken-en-de-prijs-of-het-wo/236479 "2013-09-05T23:35:28Z")

</div>

De voorraad raakte een intraday high van $ 63,58 voor het einde van de dag 0,80% hoger op $ 63,27. Signet aandelen hebben inmiddels bijna 1,30% deze week. Simpelweg omdat het meisje Ray Ban Zonnebril goede vriend m…

---

## [Location\_Capture\_By\_Lua and Reverse Proxy Cache](https://www.ruby-forum.com/t/location-capture-by-lua-and-reverse-proxy-cache/236466)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 1\
**Last updated:** [September 5, 2013, 9:29pm UTC](https://www.ruby-forum.com/t/location-capture-by-lua-and-reverse-proxy-cache/236466 "2013-09-05T21:29:18Z")

</div>

Hi, Was trying to get hold of the response recieved through upstream server or through nginx cache . However found that thier’s no cache hit when doing this way . for brevity just posting the relevant code : looks li…

---

## [Proxy\_ignore\_headers Cache-Control + Set-Cookie do not work both](https://www.ruby-forum.com/t/proxy-ignore-headers-cache-control-set-cookie-do-not-work-both/236470)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 1\
**Last updated:** [September 5, 2013, 7:33pm UTC](https://www.ruby-forum.com/t/proxy-ignore-headers-cache-control-set-cookie-do-not-work-both/236470 "2013-09-05T19:33:38Z")

</div>

Hi, in a reverse-proxy setup I want to ignore “Cache-Control:” and “Set-Cookie:” for .css and some more. Each one works perfectly. Pages sent with a cookie are being cached: location ~\* .(css|ico|js) { proxy\_pass …

---

## [A regex for rewrite](https://www.ruby-forum.com/t/a-regex-for-rewrite/236461)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 3\
**Last updated:** [September 5, 2013, 5:20pm UTC](https://www.ruby-forum.com/t/a-regex-for-rewrite/236461 "2013-09-05T17:20:59Z")

</div>

I have a set of rewrites as rewrite ^/(.)/(.)/(.).(.) /script.php?a=$1&b=$2&c=$3&ext=$4 last; rewrite ^/(.)/(.).(.) /script.php?a=$1&b=$2&ext=$3 last; rewrite ^/(.).(.) /script.php?a=$1&ext=$2 last; rewrite ^/(.)/(.)…

---

## [Nginx : Reverse Proxy + Redis](https://www.ruby-forum.com/t/nginx-reverse-proxy-redis/236463)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 0\
**Last updated:** [September 5, 2013, 7:27am UTC](https://www.ruby-forum.com/t/nginx-reverse-proxy-redis/236463 "2013-09-05T07:27:40Z")

</div>

Hi, I have an existing Nginx setup up and running to get an reverse proxy working with caching support(Nginx InMemory). I have integrated it with LUA to get some customizations for changing request as per some biz ru…

---

## [Proxy buffering for media files?](https://www.ruby-forum.com/t/proxy-buffering-for-media-files/236437)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 8\
**Last updated:** [September 4, 2013, 6:41pm UTC](https://www.ruby-forum.com/t/proxy-buffering-for-media-files/236437 "2013-09-04T18:41:36Z")

</div>

I’m working on a configuration for an nginx proxy that splits requests between two upstream servers. The main reason I’m using a proxy is for SSL termination and for redundancy between the two upstream servers. Each …

---

## [S-maxage header](https://www.ruby-forum.com/t/s-maxage-header/236448)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 0\
**Last updated:** [September 4, 2013, 9:55am UTC](https://www.ruby-forum.com/t/s-maxage-header/236448 "2013-09-04T09:55:31Z")

</div>

Hi, What’s the easiest way to set the s-maxage header correctly? For example to set s-maxage to 365 days inside a location statement that matches images, JS and CSS files. This is needed so that the proxy will cache …

---

## [Nginx + Circus + chaussette](https://www.ruby-forum.com/t/nginx-circus-chaussette/236444)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [September 3, 2013, 6:33pm UTC](https://www.ruby-forum.com/t/nginx-circus-chaussette/236444 "2013-09-03T18:33:20Z")

</div>

Hello I am using Nginx with Circus. Circus is used with chaussette Very rarely I am seeing 504 error Nginx error log says upstream timed out (110: Connection timed out) while reading response header from upstream,…

---

## [Upstream keepalive debugging](https://www.ruby-forum.com/t/upstream-keepalive-debugging/236432)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 2\
**Last updated:** [September 3, 2013, 3:25pm UTC](https://www.ruby-forum.com/t/upstream-keepalive-debugging/236432 "2013-09-03T15:25:02Z")

</div>

Hi I seem to have an issue where the upstream keepalives aren’t being re-used proxy\_http\_version 1.1; upstream dev1 { server 10.0.0.11 max\_fails=0; keepalive 1024; } location / { proxy\_pass http://dev1; proxy\_…

---

## [Mail proxy to 3rd party using ssl](https://www.ruby-forum.com/t/mail-proxy-to-3rd-party-using-ssl/246135)

<div class="topic-metadata">

**Author:** [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Replies:** 1\
**Last updated:** [September 3, 2013, 2:02pm UTC](https://www.ruby-forum.com/t/mail-proxy-to-3rd-party-using-ssl/246135 "2013-09-03T14:02:01Z")

</div>

I am setting up nginx as POP3 mail proxy to two 3rd party mail servers. Different domains, one of them uses SSL. Since I do not have that 3rd party’s SSL certificate I use my own company certificate in nginx. That ce…

---

## [Ngx\_openresty devel version 1.4.2.3 released](https://www.ruby-forum.com/t/ngx-openresty-devel-version-1-4-2-3-released/236429)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [September 3, 2013, 9:37am UTC](https://www.ruby-forum.com/t/ngx-openresty-devel-version-1-4-2-3-released/236429 "2013-09-03T09:37:55Z")

</div>

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

---

## [SSL certificate chain](https://www.ruby-forum.com/t/ssl-certificate-chain/246123)

<div class="topic-metadata">

**Author:** [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Replies:** 7\
**Last updated:** [September 2, 2013, 3:09pm UTC](https://www.ruby-forum.com/t/ssl-certificate-chain/246123 "2013-09-02T15:09:15Z")

</div>

Hi, I am trying to configure nginx 1.4.1 (using OpenSSL 1.0.1e) with a PEM encoded certificate file that contains the whole chain, 3 including Root CA. But I can not get it to work. I have followed documentation at C…

---

## [Securing nginx: Workers per server block under specific user?](https://www.ruby-forum.com/t/securing-nginx-workers-per-server-block-under-specific-user/236317)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 3\
**Last updated:** [September 2, 2013, 9:07am UTC](https://www.ruby-forum.com/t/securing-nginx-workers-per-server-block-under-specific-user/236317 "2013-09-02T09:07:02Z")

</div>

Hello, I don’t quite understand how this works. Until now I was running my websites under Cherokee Web Server. Cherokee ran under user www-data and all my websites shared the same permissions (www-data:www-data rwxrw…

---

## [NGINX perl module to server files](https://www.ruby-forum.com/t/nginx-perl-module-to-server-files/246138)

<div class="topic-metadata">

**Author:** [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Replies:** 2\
**Last updated:** [September 2, 2013, 3:28am UTC](https://www.ruby-forum.com/t/nginx-perl-module-to-server-files/246138 "2013-09-02T03:28:14Z")

</div>

Hello, I have created perl NGINX module to server static files on the NGINX (mainly images). For security reasons I am generating the AES:CBC encrypted url which I am decrypting on the NGINX and serving the file via…

---

## [What is simplest way to convert Request-URI to lowercase?](https://www.ruby-forum.com/t/what-is-simplest-way-to-convert-request-uri-to-lowercase/236383)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 1\
**Last updated:** [August 31, 2013, 2:56pm UTC](https://www.ruby-forum.com/t/what-is-simplest-way-to-convert-request-uri-to-lowercase/236383 "2013-08-31T14:56:28Z")

</div>

Hello, We are using nginx heavily. We need to rewrite all request URIs into lowercase, e.g, http://foo.bar/ThiS\_will\_be\_Rewritten/?q=Foobar will be translated into http://foo.bar/this\_will\_be\_rewritten/?q=foobar I …

---

## [Server\_Name regular expression](https://www.ruby-forum.com/t/server-name-regular-expression/236359)

<div class="topic-metadata">

**Author:** [@alcina](https://www.ruby-forum.com/u/alcina)\
**Replies:** 3\
**Last updated:** [August 30, 2013, 12:35pm UTC](https://www.ruby-forum.com/t/server-name-regular-expression/236359 "2013-08-30T12:35:52Z")

</div>

I would like to syntax a regular expression which will match two server names. The server names are example.com and www.example.com. In particular, a regular expression for www or nothing I wrote the following regula…

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

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