# Server

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

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

---

## [Basic Auth - MySQL/PgSQL Backend](https://www.ruby-forum.com/t/basic-auth-mysql-pgsql-backend/207315)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [May 23, 2011, 7:22pm UTC](https://www.ruby-forum.com/t/basic-auth-mysql-pgsql-backend/207315 "2011-05-23T19:22:38Z")

</div>

I was wondering what options are available for using BasicAuth using Either MySQL or PostGres backend to store users.

---

## [Lua location capture](https://www.ruby-forum.com/t/lua-location-capture/207180)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [May 23, 2011, 10:47am UTC](https://www.ruby-forum.com/t/lua-location-capture/207180 "2011-05-23T10:47:06Z")

</div>

Hi The lua doc at https://github.com/chaoslawful/lua-nginx-module Says “Note that, by default, subrequests issued by ngx.location.capture inherit all the request headers of the current request.” And goes on to say th…

---

## [Simple rewrite rules](https://www.ruby-forum.com/t/simple-rewrite-rules/207262)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [May 22, 2011, 9:51am UTC](https://www.ruby-forum.com/t/simple-rewrite-rules/207262 "2011-05-22T09:51:32Z")

</div>

Hello everyone, I’m trying to setup some basic rewrite rules in nginx (I’m sorry if I may be asking obvious question but I moved my servers from apache to nginx and I can’t figure out how to write simple rewrite rul…

---

## [My first rewrite QUERY\_STRING](https://www.ruby-forum.com/t/my-first-rewrite-query-string/207265)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [May 22, 2011, 7:58am UTC](https://www.ruby-forum.com/t/my-first-rewrite-query-string/207265 "2011-05-22T07:58:04Z")

</div>

Hello here is a piece of htaccess i am stuck converting into nginx rewrite conventions : RewriteCond %{QUERY\_STRING} ^sms\_ss= \[OR\] RewriteCond %{QUERY\_STRING} ^scvds= RewriteRule ^(.\*)$ http://www.mysite.com/$1? \[R=…

---

## [Randomly stopping large file downloads?](https://www.ruby-forum.com/t/randomly-stopping-large-file-downloads/207174)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [May 20, 2011, 9:44pm UTC](https://www.ruby-forum.com/t/randomly-stopping-large-file-downloads/207174 "2011-05-20T21:44:39Z")

</div>

Hi, 1.) What would cause nginx to randomly stop serving large file downloads? When I try to download a 800MB file it stops serving the file after between 10 and 30 MB. I’ve had to revert to lighttpd because of this. …

---

## [Nginx for multiple sub-domain?](https://www.ruby-forum.com/t/nginx-for-multiple-sub-domain/207223)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [May 20, 2011, 8:50pm UTC](https://www.ruby-forum.com/t/nginx-for-multiple-sub-domain/207223 "2011-05-20T20:50:09Z")

</div>

Hello, I have a web site, e.g., www.example.com under it, i have several sub-domains, e.g., /register, /query, /report. I have a requirement that, /query is for port 80 /register is for port 443, but with server si…

---

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

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 3\
**Last updated:** [May 20, 2011, 2:12pm UTC](https://www.ruby-forum.com/t/try-files/207179 "2011-05-20T14:12:46Z")

</div>

I have a uwsgi\_app I was wondering why location / { root /myapp; index index.html index.wsgi; try\_files $uri $uri/ @wsgi; } ; When I visit the domain.com returns a 403 (when I dont have an index.html file in th…

---

## [2 questions on send\_timeout (maybe bugs)](https://www.ruby-forum.com/t/2-questions-on-send-timeout-maybe-bugs/207102)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [May 20, 2011, 1:33pm UTC](https://www.ruby-forum.com/t/2-questions-on-send-timeout-maybe-bugs/207102 "2011-05-20T13:33:51Z")

</div>

hi all, I meet 2 question when using nginx 1.0.0. Question1. what happens if the downstream connection breaks, before all data sent to the client? get client’s request set handler: r-\>read\_event\_handle=ngx\_http\_blo…

---

## [Proxy\_pass and slash witch nginx](https://www.ruby-forum.com/t/proxy-pass-and-slash-witch-nginx/207115)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [May 20, 2011, 1:07pm UTC](https://www.ruby-forum.com/t/proxy-pass-and-slash-witch-nginx/207115 "2011-05-20T13:07:16Z")

</div>

Hello, I set up a reverse proxy for a client with Nginx. I still have a problem when I click on a link but the name of the directory doesn’t end with a slash. The proxy address is http://proxy.com and all requests ar…

---

## [Cache process manager consume a lot of CPU at reload and has to be restarted](https://www.ruby-forum.com/t/cache-process-manager-consume-a-lot-of-cpu-at-reload-and-has-to-be-restarted/205229)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 10\
**Last updated:** [May 20, 2011, 11:40am UTC](https://www.ruby-forum.com/t/cache-process-manager-consume-a-lot-of-cpu-at-reload-and-has-to-be-restarted/205229 "2011-05-20T11:40:47Z")

</div>

Hello, I had an issue last night with a 0.8.54 nginx instance. Around 1AM, a HUP signal is sent to log rotation. This nginx instance is set up as a reverse proxy to an apache/php and it does some cache. Here is the …

---

## [Disabling basic\_auth with rewrites](https://www.ruby-forum.com/t/disabling-basic-auth-with-rewrites/207155)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [May 20, 2011, 10:00am UTC](https://www.ruby-forum.com/t/disabling-basic-auth-with-rewrites/207155 "2011-05-20T10:00:40Z")

</div>

Hi, I would like to generally protect my site but allow one certain path. However, I need rewrites to forward the requested path to a PHP file. Unfortunately the following does not work: location ~ ^/feeds/importer/.…

---

## [File AIO and multiple nginx instances](https://www.ruby-forum.com/t/file-aio-and-multiple-nginx-instances/207090)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [May 20, 2011, 9:00am UTC](https://www.ruby-forum.com/t/file-aio-and-multiple-nginx-instances/207090 "2011-05-20T09:00:09Z")

</div>

Hello. I need to run two nginx instances on one server (not two workers, but two master processes with their own number of workers each). The problem is that when nginx is compiled with aio support I can start only on…

---

## [Lua: ngx.location.capture / limit proxy\_cache individual file size](https://www.ruby-forum.com/t/lua-ngx-location-capture-limit-proxy-cache-individual-file-size/207167)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [May 20, 2011, 8:52am UTC](https://www.ruby-forum.com/t/lua-ngx-location-capture-limit-proxy-cache-individual-file-size/207167 "2011-05-20T08:52:08Z")

</div>

Hi Is it possible to do a version of ngx.location.capture that only does a HEAD request rather than GET? I’m only interested in the headers returned, the body would make what I’m trying to do pointless :frowning: Al…

---

## [How to Set Expires With Try Files](https://www.ruby-forum.com/t/how-to-set-expires-with-try-files/207189)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [May 20, 2011, 7:36am UTC](https://www.ruby-forum.com/t/how-to-set-expires-with-try-files/207189 "2011-05-20T07:36:51Z")

</div>

Below is my config file. How can I change the two “if” blocks to try\_files, and still do a 30d expires for static files? server { listen 80; server\_name www.joshpearce.org; client\_max\_body\_size 4M; access\_log /…

---

## [Loadbalancing](https://www.ruby-forum.com/t/loadbalancing/207172)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [May 19, 2011, 9:53pm UTC](https://www.ruby-forum.com/t/loadbalancing/207172 "2011-05-19T21:53:26Z")

</div>

Hi! It’s been a while now that I am struggling with nginx round-robin load balancer. The problem that I am experiencing is that when a server goes down, the entire upstream is not balanced anymore. The next server wi…

---

## [Question about using the load balancer](https://www.ruby-forum.com/t/question-about-using-the-load-balancer/207170)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [May 19, 2011, 9:35pm UTC](https://www.ruby-forum.com/t/question-about-using-the-load-balancer/207170 "2011-05-19T21:35:29Z")

</div>

Hello, I am using nginx as a load balancer in front of a tier of 4 web servers in a configuration very similar to: Simple Load Balancing | NGINX I am doing rolling deployments of my application on the 4 web servers. …

---

## [Searching example config for my setup](https://www.ruby-forum.com/t/searching-example-config-for-my-setup/207126)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [May 19, 2011, 5:35pm UTC](https://www.ruby-forum.com/t/searching-example-config-for-my-setup/207126 "2011-05-19T17:35:44Z")

</div>

I am searching for an example configuration file for nginx for the follow set-up: firewall with prerouting port 80 and 443 to server-x running nginx server-a running apache on port 80 (a.example.org) (192.168.24.6…

---

## [Virtualization](https://www.ruby-forum.com/t/virtualization/206637)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [May 19, 2011, 3:24pm UTC](https://www.ruby-forum.com/t/virtualization/206637 "2011-05-19T15:24:42Z")

</div>

Hey! I am trying to virtualize nginx in my own private cloud. Is there any special consideration regard configuration that I have to consider? Anyone did something similar? Regard throughput, anyone with some numbers…

---

## [Serving websites from S3](https://www.ruby-forum.com/t/serving-websites-from-s3/207132)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [May 19, 2011, 11:17am UTC](https://www.ruby-forum.com/t/serving-websites-from-s3/207132 "2011-05-19T11:17:23Z")

</div>

Hi guys, I’ve tried to ask pretty much everywhere, but no solution until now. I’m quite sure I’m doing something wrong here, but to be honest I’m not able to catch it. I’m rewriting urls from test.foo.com to bar.foo.…

---

## [Max\_fails for 404s?](https://www.ruby-forum.com/t/max-fails-for-404s/207123)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [May 18, 2011, 11:04pm UTC](https://www.ruby-forum.com/t/max-fails-for-404s/207123 "2011-05-18T23:04:37Z")

</div>

Hey folks, We’ve got the following scenario occurring in production. The solution is non-obvious… to me, at least. \[client\] ==\> \[nginx\] ==\> \[service S\] nginx fronting 2 application servers which provide a service S…

---

## [Proxy\_cache 404 doesn't add headers](https://www.ruby-forum.com/t/proxy-cache-404-doesnt-add-headers/207125)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [May 18, 2011, 10:21pm UTC](https://www.ruby-forum.com/t/proxy-cache-404-doesnt-add-headers/207125 "2011-05-18T22:21:21Z")

</div>

Hi. In nginx 1.0.2 on Fedora, I’m using the proxy\_cache in conjunction with add\_header to add the following header with cache-status (MISS,EXPIRED, etc.) after the cache check: add\_header X-Cache “$upstream\_cache\_…

---

## [Ngx\_http\_secure\_download report back to application?](https://www.ruby-forum.com/t/ngx-http-secure-download-report-back-to-application/207096)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [May 18, 2011, 4:35pm UTC](https://www.ruby-forum.com/t/ngx-http-secure-download-report-back-to-application/207096 "2011-05-18T16:35:54Z")

</div>

Hello, I’m thinking about writing an application, which should use nginx’ secure download module to generate secure - expireing - links and limit the number of (successful) downloads. Since it only should count succe…

---

## [Proxy module - upstream server recovery from inoperative mode](https://www.ruby-forum.com/t/proxy-module-upstream-server-recovery-from-inoperative-mode/207092)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [May 18, 2011, 7:14am UTC](https://www.ruby-forum.com/t/proxy-module-upstream-server-recovery-from-inoperative-mode/207092 "2011-05-18T07:14:01Z")

</div>

Hi All, We are trying to use NGINX as a load balancing solution for our production servers. Our infrastructure contains few application server using SOAP XML over HTTP. NGNIX suppose to balance between servers. Pleas…

---

## [Conditionally set header in proxy](https://www.ruby-forum.com/t/conditionally-set-header-in-proxy/207079)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [May 18, 2011, 6:43am UTC](https://www.ruby-forum.com/t/conditionally-set-header-in-proxy/207079 "2011-05-18T06:43:48Z")

</div>

Hello, I’m doing SSL termination in nginx, and I’d like to set a header such as “X-Sheme https” ONLY if X-Scheme is not set. The reason is because an upstream load balancer may have terminated SSL as well, and I don’t…

---

## [CanNginx Mail Server replace Postfix to listen only?](https://www.ruby-forum.com/t/cannginx-mail-server-replace-postfix-to-listen-only/207077)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 1\
**Last updated:** [May 17, 2011, 8:39pm UTC](https://www.ruby-forum.com/t/cannginx-mail-server-replace-postfix-to-listen-only/207077 "2011-05-17T20:39:50Z")

</div>

Can the Nginx mail server be used in replacement of Postfix? I am a bit new to this. However, I have a small, fully functioning, unmanaged VPS server, rented from Linode.com, which is setup as a LEMP server, running …

---

## [Profiling NGINX](https://www.ruby-forum.com/t/profiling-nginx/207071)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [May 17, 2011, 7:25pm UTC](https://www.ruby-forum.com/t/profiling-nginx/207071 "2011-05-17T19:25:38Z")

</div>

Hello all, I need to profile nginx+own\_module. I’ve being trying to use gprof, but even tough compiling along with --with-cc-opt=“-pg” --with-ld-opt=“-pg” the gmon.out is not being generated. Any ideas? Cheers, AB …

---

## [Smtp proxy to external smtp server](https://www.ruby-forum.com/t/smtp-proxy-to-external-smtp-server/207052)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [May 17, 2011, 8:59am UTC](https://www.ruby-forum.com/t/smtp-proxy-to-external-smtp-server/207052 "2011-05-17T08:59:46Z")

</div>

Hi all Can nginx used as smtp proxy connecting to an external smtp server? The external smtp server requires smtp auth. Thanks Mike Posted at Nginx Forum:

---

## [Compiling with a custom SSL library](https://www.ruby-forum.com/t/compiling-with-a-custom-ssl-library/207006)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [May 17, 2011, 2:02am UTC](https://www.ruby-forum.com/t/compiling-with-a-custom-ssl-library/207006 "2011-05-17T02:02:10Z")

</div>

Decided to compile my own copy of openssl (dev snapshot) which is stored in /usr/local/ssl ,…but nginx isn’t detecting it :frowning: root@server:/usr/local/ssl# ls -al total 48 drwxr-xr-x 9 root root 4096 2011-05-1…

---

## [Keepalived Connections Reset after reloading the configuration (HUP Signal)](https://www.ruby-forum.com/t/keepalived-connections-reset-after-reloading-the-configuration-hup-signal/206958)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 2\
**Last updated:** [May 17, 2011, 12:12am UTC](https://www.ruby-forum.com/t/keepalived-connections-reset-after-reloading-the-configuration-hup-signal/206958 "2011-05-17T00:12:43Z")

</div>

Hello, I’m dealing with a problem. When reloading the nginx configuration, all keepalived connections receive the TCP reset flag after I send a HUP signal to the master process. If I comment the line responsible for …

---

## [Gzip compression not taken into account?](https://www.ruby-forum.com/t/gzip-compression-not-taken-into-account/206949)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 8\
**Last updated:** [May 16, 2011, 1:30pm UTC](https://www.ruby-forum.com/t/gzip-compression-not-taken-into-account/206949 "2011-05-16T13:30:07Z")

</div>

Hi, I have enabled gzip compression following the wiki instructions like this: location / { #… gzip on; gzip\_min\_length 1000; gzip\_proxied expired no-cache no-store private auth; gzip\_types text/plain application/…

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

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