# Server

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

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

---

## [Nginx Frontend with Apache2 and Drupal6](https://www.ruby-forum.com/t/nginx-frontend-with-apache2-and-drupal6/222744)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 10\
**Last updated:** [September 9, 2012, 3:55pm UTC](https://www.ruby-forum.com/t/nginx-frontend-with-apache2-and-drupal6/222744 "2012-09-09T15:55:43Z")

</div>

Hi, I have a dedicated server running Nginx as a front end and apache2 on port:8080. An online game is installed as an application in drupal6. The site works fine without any issues. The problem is that when someon…

---

## [Re: rewrite to www EXCEPT for one directory](https://www.ruby-forum.com/t/re-rewrite-to-www-except-for-one-directory/222714)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [September 7, 2012, 2:20pm UTC](https://www.ruby-forum.com/t/re-rewrite-to-www-except-for-one-directory/222714 "2012-09-07T14:20:37Z")

</div>

} wbr, Valentin V. Bartenev I suggest to use $scheme like in: rewrite ^(.\*) $scheme://www.example.org/$1 permanent; to keep the https connection (if a client wants to use it). otherwise your server drops the http…

---

## [Tengine-1.4.0](https://www.ruby-forum.com/t/tengine-1-4-0/222678)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 17\
**Last updated:** [September 7, 2012, 10:48am UTC](https://www.ruby-forum.com/t/tengine-1-4-0/222678 "2012-09-07T10:48:31Z")

</div>

Hi folks, We are excited to announce that Tengine-1.4.0 has been released. This is the first release of the 1.4 development branch. You can either checkout the source code from github: GitHub - alibaba-archive/tengin…

---

## [Rewrite to www EXCEPT for one directory](https://www.ruby-forum.com/t/rewrite-to-www-except-for-one-directory/222706)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [September 6, 2012, 8:38pm UTC](https://www.ruby-forum.com/t/rewrite-to-www-except-for-one-directory/222706 "2012-09-06T20:38:57Z")

</div>

I have the following in my nginx.conf to redirect to www. to deal with Google duplicate issues. server { server\_name example.com listen 80; location / { rewrite ^(.\*) http://www.example.com$1 permanent; } } Howe…

---

## [Backup servers/ proxy\_next\_upstream questions](https://www.ruby-forum.com/t/backup-servers-proxy-next-upstream-questions/222707)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [September 6, 2012, 8:22pm UTC](https://www.ruby-forum.com/t/backup-servers-proxy-next-upstream-questions/222707 "2012-09-06T20:22:36Z")

</div>

Hello All, I have a few questions on backup servers and proxy\_next\_upstream in general: For the backup server the doc says: “only uses this server if the non-backup servers are all down or busy” So what exactly con…

---

## [How can I block the attack like this?](https://www.ruby-forum.com/t/how-can-i-block-the-attack-like-this/222642)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 6\
**Last updated:** [September 5, 2012, 3:48am UTC](https://www.ruby-forum.com/t/how-can-i-block-the-attack-like-this/222642 "2012-09-05T03:48:28Z")

</div>

Hi all, Today my server was attacked. After checked Nginx access log, I found logs like below: 116.114.17.182 - - \[04/Sep/2012:20:27:41 +0800\] “GET /member.php??username=xxxx&rndnum=-1777927191 HTTP/1.1” 500 186 “-” …

---

## [Variable interpolation in a regex](https://www.ruby-forum.com/t/variable-interpolation-in-a-regex/222654)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [September 4, 2012, 10:47pm UTC](https://www.ruby-forum.com/t/variable-interpolation-in-a-regex/222654 "2012-09-04T22:47:01Z")

</div>

Hello All, I have a map block: map $http\_cookie $myVal { "~adq\_cnv(\\d+)=($cmpid\[^;\]+#(?P\<DC\>\\w{2}))(?:;|$)" $DC; default "XYZ"; } The $cmpid used in the left side of a map is to be inte…

---

## [Nginx location rule for Wordpress Multisite in subdirectories](https://www.ruby-forum.com/t/nginx-location-rule-for-wordpress-multisite-in-subdirectories/222388)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 4\
**Last updated:** [September 4, 2012, 7:48pm UTC](https://www.ruby-forum.com/t/nginx-location-rule-for-wordpress-multisite-in-subdirectories/222388 "2012-09-04T19:48:08Z")

</div>

Hi everyone! I currently have a wordpress blog located at blogname and, as per threads here, I had the following on my nginx.conf: location ^~ /blogname { try\_files $uri /blogname/index.php?q=$uri; location ~ .php$…

---

## [Rewrite problem](https://www.ruby-forum.com/t/rewrite-problem/222619)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [September 4, 2012, 7:21pm UTC](https://www.ruby-forum.com/t/rewrite-problem/222619 "2012-09-04T19:21:48Z")

</div>

HI list I want to redirect http://www.mysite.com/bbs/viewthread.php?tid=8123&extra= to http://www.mysite.com/forum.php?mod=viewthread&tid=8123 This is what I place in the “server” block in the nginx.conf rewrite …

---

## [Nginx Upstream Check can not find the check servers on status page](https://www.ruby-forum.com/t/nginx-upstream-check-can-not-find-the-check-servers-on-status-page/222597)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 4\
**Last updated:** [September 4, 2012, 11:13am UTC](https://www.ruby-forum.com/t/nginx-upstream-check-can-not-find-the-check-servers-on-status-page/222597 "2012-09-04T11:13:03Z")

</div>

Hi, We use the Nginx upstream check module 1 with the Nginx upstream fair module for Nginx 1.2.2. Whenever we disable the fair module or compile without the fair module we cannot view the healthcheck status page and …

---

## [Choosing backend based on header value](https://www.ruby-forum.com/t/choosing-backend-based-on-header-value/222612)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [September 4, 2012, 2:27am UTC](https://www.ruby-forum.com/t/choosing-backend-based-on-header-value/222612 "2012-09-04T02:27:44Z")

</div>

Hi All, I have a requirement wherein I need to choose a backend based on the value of a header sent by the client. But in all other cases where the header is not set I would like to use the available upstream block w…

---

## [Input Headers. - headers\_more\_module](https://www.ruby-forum.com/t/input-headers-headers-more-module/222504)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 11\
**Last updated:** [September 3, 2012, 11:04pm UTC](https://www.ruby-forum.com/t/input-headers-headers-more-module/222504 "2012-09-03T23:04:23Z")

</div>

I am trying to figure out what I dont see request headers added to the request. I am trying to add ‘X-Server-ID: $id’ Here is a snippet form my config. location /{ more\_set\_input\_headers ‘X-Server-ID: $id’; more\_se…

---

## [Regex matching on a cookie](https://www.ruby-forum.com/t/regex-matching-on-a-cookie/222601)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 4\
**Last updated:** [September 3, 2012, 9:57pm UTC](https://www.ruby-forum.com/t/regex-matching-on-a-cookie/222601 "2012-09-03T21:57:12Z")

</div>

Hello, I have a URI like this: example.com/cnvpb/$IntegerA/$TermA eg: example.com/cnvpb/1233/Q4 For this request , I might get cookies with names like abc\_cnv1, abc\_cnv2, abc\_cnv3…abc\_cnv5 all or some of them. The…

---

## [X-accel-redirect serving html download page instead of file](https://www.ruby-forum.com/t/x-accel-redirect-serving-html-download-page-instead-of-file/222415)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 6\
**Last updated:** [September 3, 2012, 8:31pm UTC](https://www.ruby-forum.com/t/x-accel-redirect-serving-html-download-page-instead-of-file/222415 "2012-09-03T20:31:20Z")

</div>

I have a script that uses x-accel-redirect on a nginx server to send large files (150mb+). The script serves downloads fine as long as their is a space in the name of the directory but not when the directory is a sin…

---

## [Setting SSI variables from configuration](https://www.ruby-forum.com/t/setting-ssi-variables-from-configuration/222586)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [September 3, 2012, 1:04pm UTC](https://www.ruby-forum.com/t/setting-ssi-variables-from-configuration/222586 "2012-09-03T13:04:15Z")

</div>

Hi, I have an SSI page with the following in it: I would like to set CRAN\_HOST to a given value, but I couldn’t find any ways of doing this with nginx. Any ideas? Thanks,

---

## [Redirect 404 errors to a separate log file](https://www.ruby-forum.com/t/redirect-404-errors-to-a-separate-log-file/222405)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [September 3, 2012, 10:49am UTC](https://www.ruby-forum.com/t/redirect-404-errors-to-a-separate-log-file/222405 "2012-09-03T10:49:12Z")

</div>

I have been trying for a whole day to figure out how to redirect 404 errors to a separate log file. I managed to do this in the server directive: error\_page 404 = @404; location @404 { error\_log /var/log/nginx/404…

---

## [How to tranparently deal with MogileFS with php and nginx](https://www.ruby-forum.com/t/how-to-tranparently-deal-with-mogilefs-with-php-and-nginx/222582)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [September 3, 2012, 6:25am UTC](https://www.ruby-forum.com/t/how-to-tranparently-deal-with-mogilefs-with-php-and-nginx/222582 "2012-09-03T06:25:33Z")

</div>

As I’m working on this new project based on image uploads, my brains buzzing with all the stuff I’m reading to try and make the project scalable from day one. As I said in another thread, it’s much calmer for me to as…

---

## [Photo uploads and scalability](https://www.ruby-forum.com/t/photo-uploads-and-scalability/222532)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 6\
**Last updated:** [September 2, 2012, 1:22am UTC](https://www.ruby-forum.com/t/photo-uploads-and-scalability/222532 "2012-09-02T01:22:26Z")

</div>

Getting ready to work on a new section of the site which will require a reader to upload a photo and write a caption. It’s my first time writing anything to do with uploading and I’m wondering what things in the nginx…

---

## [Problem with load php](https://www.ruby-forum.com/t/problem-with-load-php/222521)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [September 2, 2012, 12:39am UTC](https://www.ruby-forum.com/t/problem-with-load-php/222521 "2012-09-02T00:39:46Z")

</div>

hello. I use nginx on Windose server 2003,so for load script get erorr 403 Forbidden ,but when load a html page it load how i can use php on nginx ? Posted at Nginx Forum:

---

## [Rewrite a Shortened URL to a Pretty URL?](https://www.ruby-forum.com/t/rewrite-a-shortened-url-to-a-pretty-url/222400)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 4\
**Last updated:** [September 1, 2012, 7:47pm UTC](https://www.ruby-forum.com/t/rewrite-a-shortened-url-to-a-pretty-url/222400 "2012-09-01T19:47:08Z")

</div>

Hi, I was hoping someone could help me with a rewrite question. Currently, I use a basic rewrite for my url shortener. if (!-e $request\_filename) { rewrite ^/(.\*)$ /entry/index.php?id=$1 permanent; } This forwards …

---

## [Accept connections and close connection hooks in custom module](https://www.ruby-forum.com/t/accept-connections-and-close-connection-hooks-in-custom-module/221779)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 4\
**Last updated:** [September 1, 2012, 5:12pm UTC](https://www.ruby-forum.com/t/accept-connections-and-close-connection-hooks-in-custom-module/221779 "2012-09-01T17:12:15Z")

</div>

Hi all, I’m currently porting Apache module to nginx and need to have preconnection and postconnection hook for custom code. In apache it is ap\_hook\_pre\_connection and apr\_pool\_cleanup\_register calls. Is it possible…

---

## [Problem with own error pages in nginx 1.3.5](https://www.ruby-forum.com/t/problem-with-own-error-pages-in-nginx-1-3-5/222410)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [September 1, 2012, 12:36pm UTC](https://www.ruby-forum.com/t/problem-with-own-error-pages-in-nginx-1-3-5/222410 "2012-09-01T12:36:59Z")

</div>

I have a problem with my own error pages with nginx 1.3.5. \[CODE\]... error\_page 401 402 403 404 /40x.html; location = /40x.html { root /www/default/html; } ...\[/CODE\] With Firefox is all OK. With IE 8 and IE 9 …

---

## [Nginx won't send FIN ACK to PHP-FPM](https://www.ruby-forum.com/t/nginx-wont-send-fin-ack-to-php-fpm/222408)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [September 1, 2012, 12:27pm UTC](https://www.ruby-forum.com/t/nginx-wont-send-fin-ack-to-php-fpm/222408 "2012-09-01T12:27:03Z")

</div>

Hey, I have Rest API server powered by Nginx and PHP-FPM. Each API call produces several CURL requests. The script that executes the API calls, also utilizes CURL. I use curl multi exec, with 1,000 threads. All the…

---

## [Achieving strong client -\> upstrem\_server affinity](https://www.ruby-forum.com/t/achieving-strong-client-upstrem-server-affinity/222506)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 6\
**Last updated:** [September 1, 2012, 2:20am UTC](https://www.ruby-forum.com/t/achieving-strong-client-upstrem-server-affinity/222506 "2012-09-01T02:20:26Z")

</div>

Hi, I am using Nginx 1.1.19 on Ubuntu 12.04 (LTS) server. Nginx is used to load balance traffic between two instances of the Punjab XMPP-BOSH server. Below is the relevant part from my nginx configuration : upstream…

---

## [Hide/Delete a cookie when stored in cache](https://www.ruby-forum.com/t/hide-delete-a-cookie-when-stored-in-cache/222475)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [September 1, 2012, 1:03am UTC](https://www.ruby-forum.com/t/hide-delete-a-cookie-when-stored-in-cache/222475 "2012-09-01T01:03:21Z")

</div>

Hello, I’m caching pages with nginx using the following rules: fastcgi\_no\_cache $cookie\_member\_id $is\_args fastcgi\_cache\_bypass $cookie\_member\_id $is\_args fastcgi\_ignore\_headers Cache-Control Expires Set-Cookie; Now…

---

## [Stud -\> Haproxy -\> and Nginx; nginx real\_ip\_header isn't working as expected, can't scale](https://www.ruby-forum.com/t/stud-haproxy-and-nginx-nginx-real-ip-header-isnt-working-as-expected-cant-scale/222533)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [September 1, 2012, 12:42am UTC](https://www.ruby-forum.com/t/stud-haproxy-and-nginx-nginx-real-ip-header-isnt-working-as-expected-cant-scale/222533 "2012-09-01T00:42:54Z")

</div>

I got through all of that, finally i’m to nginx… I only have one load balancer at the moment, but given the addition of a second or third in which I cannot rely on all of the ip addresses to be expressible any other w…

---

## [Header is not passed to proxy](https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [August 31, 2012, 11:53pm UTC](https://www.ruby-forum.com/t/header-is-not-passed-to-proxy/222474 "2012-08-31T23:53:15Z")

</div>

Hi Maxim, thanks a lot for your moduel. it was extremely useful for me. I have the following config: location /upload { auth\_request /auth; … location /auth { proxy\_pass ; } The initial request to /upload has hea…

---

## [Auth request module header passing](https://www.ruby-forum.com/t/auth-request-module-header-passing/222490)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [August 31, 2012, 8:22pm UTC](https://www.ruby-forum.com/t/auth-request-module-header-passing/222490 "2012-08-31T20:22:56Z")

</div>

Hi Maxim, Many thanks to your work! I am using auth req module and have experienced the following problem (issue). I can’t get the headers to be passed to auth backend from initial request. location /initial { aut…

---

## [How to keep "hot" files in memory?](https://www.ruby-forum.com/t/how-to-keep-hot-files-in-memory/222466)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 6\
**Last updated:** [August 31, 2012, 8:20pm UTC](https://www.ruby-forum.com/t/how-to-keep-hot-files-in-memory/222466 "2012-08-31T20:20:00Z")

</div>

Dear all. We use nginx to server lots of static content with high traffic loads. And the server is getting slower, because slower SATA drive. So I think how to keep “hot” files in memory without other software,just …

---

## [Soft lock for Basic Auth](https://www.ruby-forum.com/t/soft-lock-for-basic-auth/222436)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 31, 2012, 7:36pm UTC](https://www.ruby-forum.com/t/soft-lock-for-basic-auth/222436 "2012-08-31T19:36:44Z")

</div>

Hi all, Is it possible to apply a soft lock timeout on invalid password attempts for auth\_basic "Login"; auth\_basic\_user\_file /etc/.htpasswd; Quintin

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

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