# Server

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

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

---

## [How to load module in nginx.conf like we do in httpd.conf?](https://www.ruby-forum.com/t/how-to-load-module-in-nginx-conf-like-we-do-in-httpd-conf/222010)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 9, 2012, 1:26am UTC](https://www.ruby-forum.com/t/how-to-load-module-in-nginx-conf-like-we-do-in-httpd-conf/222010 "2012-08-09T01:26:09Z")

</div>

Hi, I want to load all the modules which are mentioned below are in httpd.conf.Can you tell me how i can do this in nginx.conf? httpd.conf: LoadModule auth\_basic\_module modules/mod\_auth\_basic.so LoadModule auth\_dige…

---

## [IP backend reverse proxy problem](https://www.ruby-forum.com/t/ip-backend-reverse-proxy-problem/222006)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 9, 2012, 1:19am UTC](https://www.ruby-forum.com/t/ip-backend-reverse-proxy-problem/222006 "2012-08-09T01:19:03Z")

</div>

Hi, I’ve installed nginx as a reverse proxy with 2 backends web servers (one nginx, one apache). I want the backends servers to have the “real” IP of the client on their logs and on the webpage. I tried proxy\_set\_head…

---

## [How to write ScriptAlias in nginx.conf like in httpd.conf](https://www.ruby-forum.com/t/how-to-write-scriptalias-in-nginx-conf-like-in-httpd-conf/222008)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 9, 2012, 1:08am UTC](https://www.ruby-forum.com/t/how-to-write-scriptalias-in-nginx-conf-like-in-httpd-conf/222008 "2012-08-09T01:08:46Z")

</div>

I have to configure nginx.conf just like the httpd.conf and stuck while configuring ScriptAlias. I have ScriptAlias /cgi-bin/ “/var/www/cgi-bin/” i want to write the above in nginx.conf. How can I write it?

---

## [Python in Nginx // windows 2008](https://www.ruby-forum.com/t/python-in-nginx-windows-2008/221981)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [August 8, 2012, 11:10pm UTC](https://www.ruby-forum.com/t/python-in-nginx-windows-2008/221981 "2012-08-08T23:10:45Z")

</div>

I need to run python in Nginx. What do I need to install and configure? I have windows 2008. Posted at Nginx Forum:

---

## [404 fallback only hitting 2/3 upstream sets](https://www.ruby-forum.com/t/404-fallback-only-hitting-2-3-upstream-sets/221969)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 5\
**Last updated:** [August 8, 2012, 6:51pm UTC](https://www.ruby-forum.com/t/404-fallback-only-hitting-2-3-upstream-sets/221969 "2012-08-08T18:51:53Z")

</div>

I currently have a setup where I have 3 upstream sets (directives?), and it will fallback in a chain. So if it gets a 404 from setA, it’ll go to setB. If setB also has a 404, then setC. The config is: upstream setA { …

---

## [Proxying/redirecting after request has been rewritten](https://www.ruby-forum.com/t/proxying-redirecting-after-request-has-been-rewritten/221997)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 8, 2012, 5:38pm UTC](https://www.ruby-forum.com/t/proxying-redirecting-after-request-has-been-rewritten/221997 "2012-08-08T17:38:51Z")

</div>

Hi everyone. I’m trying to get Nginx to run some Regex’s on requests and send them to another server block, returning the response headers from the second server block. At the moment I get a 302 response status, how d…

---

## [How to prevent nginx locks](https://www.ruby-forum.com/t/how-to-prevent-nginx-locks/221999)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 8, 2012, 5:36pm UTC](https://www.ruby-forum.com/t/how-to-prevent-nginx-locks/221999 "2012-08-08T17:36:30Z")

</div>

Hello all, I have a situation with nginx where occasionally all my worker process hang (a ps -awx returns D state) which means that my webserver becomes irresponsive. I have to add that the lock occurs when trying to…

---

## [Lua handler aborted: memory allocation error: not enough memory](https://www.ruby-forum.com/t/lua-handler-aborted-memory-allocation-error-not-enough-memory/221970)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 8, 2012, 4:04pm UTC](https://www.ruby-forum.com/t/lua-handler-aborted-memory-allocation-error-not-enough-memory/221970 "2012-08-08T16:04:43Z")

</div>

Hello, Please help me to solve a problem. I use Lua to get a value from memcache and then jump into next nginx location and get these errors from time to time (ofen enaugh). lua handler aborted: memory allocation err…

---

## [Add header after fcgi handling](https://www.ruby-forum.com/t/add-header-after-fcgi-handling/221988)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [August 8, 2012, 1:32pm UTC](https://www.ruby-forum.com/t/add-header-after-fcgi-handling/221988 "2012-08-08T13:32:11Z")

</div>

Hi, please can anybody help me, I’m stucked and sure that I think in wrong way. the .htaccess /web/root/interfaces/.htaccess RewriteEngine on RewriteBase /interfaces RewriteRule ^json/(.\*) index.php?x=$1&%{QUERY\_S…

---

## [Rewrite PHP block older browsers](https://www.ruby-forum.com/t/rewrite-php-block-older-browsers/221991)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 8, 2012, 1:25pm UTC](https://www.ruby-forum.com/t/rewrite-php-block-older-browsers/221991 "2012-08-08T13:25:10Z")

</div>

I have the following config file that works for everything but PHP pages. I am trying to get everything as an ancient\_browser to add /IE/ in the URL. Essentially changing the root for these clients although you cannot …

---

## [Getting proxy\_pass to work with sub\_filter](https://www.ruby-forum.com/t/getting-proxy-pass-to-work-with-sub-filter/221975)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 8, 2012, 12:41pm UTC](https://www.ruby-forum.com/t/getting-proxy-pass-to-work-with-sub-filter/221975 "2012-08-08T12:41:20Z")

</div>

Hello, I’m trying to have nginx proxy for apache while trying to utilize sub\_filter. My default.conf block with the modules listed above looks like this: server { location / { proxy\_pass h…

---

## [Dynamic Cache in Nginx](https://www.ruby-forum.com/t/dynamic-cache-in-nginx/221974)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 8, 2012, 12:37pm UTC](https://www.ruby-forum.com/t/dynamic-cache-in-nginx/221974 "2012-08-08T12:37:49Z")

</div>

Hello guys, I’m trying to set some Expires in a lot of JavaScript that I got here, but they are not static on filesystem, it is dynamic generated by a Java application. If I do this: =================== location /…

---

## [Proxy\_pass strips http when there are 2 or more redirect link](https://www.ruby-forum.com/t/proxy-pass-strips-http-when-there-are-2-or-more-redirect-link/221986)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 8, 2012, 10:24am UTC](https://www.ruby-forum.com/t/proxy-pass-strips-http-when-there-are-2-or-more-redirect-link/221986 "2012-08-08T10:24:05Z")

</div>

Hello G.s, I am using proxy\_pass to do something like this: proxy\_pass ‘somedomain.com’ But what happens is it passes the request directly to “http://www.flipkart.com/%3Fpid=9780099579939%26affid%3Dtyroo%26cmpid%3Da…

---

## [Nginx-1.2.3](https://www.ruby-forum.com/t/nginx-1-2-3/221960)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [August 8, 2012, 6:42am UTC](https://www.ruby-forum.com/t/nginx-1-2-3/221960 "2012-08-08T06:42:21Z")

</div>

Changes with nginx 1.2.3 07 Aug 2012 \*) Feature: the Clang compiler support. \*) Bugfix: extra listening sockets might be created. Thanks to Roman Odaisky. \*) Bugfix: nginx/W…

---

## [Deny directory abc denies directory abcd etc](https://www.ruby-forum.com/t/deny-directory-abc-denies-directory-abcd-etc/221973)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 7, 2012, 9:09pm UTC](https://www.ruby-forum.com/t/deny-directory-abc-denies-directory-abcd-etc/221973 "2012-08-07T21:09:05Z")

</div>

Hi I’m new to this forum so I hope this hasn’t come up before I didn’t find anything by searching. I’m using the following to block access to multiple directories: location ~ /(abc|def|ghi) { deny all; access\_log of…

---

## [Nginx and multi-threading support](https://www.ruby-forum.com/t/nginx-and-multi-threading-support/221959)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 7, 2012, 5:47pm UTC](https://www.ruby-forum.com/t/nginx-and-multi-threading-support/221959 "2012-08-07T17:47:30Z")

</div>

I am looking at using nginx for an embedded environment. I understand that nginx uses non-blocking event-driven IO and has multiple worker processes to scale to multiple cores. Looking at the code, I see there is an …

---

## [Force "internal" directive to display a custom 404?](https://www.ruby-forum.com/t/force-internal-directive-to-display-a-custom-404/221950)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [August 7, 2012, 3:51pm UTC](https://www.ruby-forum.com/t/force-internal-directive-to-display-a-custom-404/221950 "2012-08-07T15:51:43Z")

</div>

Example: error\_page 404 /404.html; location = /404.html { internal; } location /alpha { internal; } The proper behavior would be to display the custom 404.html in every case, which does not. I’m not sure this c…

---

## [Redirect Mobile Users to m.domain.com](https://www.ruby-forum.com/t/redirect-mobile-users-to-m-domain-com/221949)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [August 6, 2012, 11:46pm UTC](https://www.ruby-forum.com/t/redirect-mobile-users-to-m-domain-com/221949 "2012-08-06T23:46:26Z")

</div>

Hi all, I have a wordpress website http://domain.com. I have created a mobile version of it and put in “m” folder of that domain. I want all my mobile users to be redirected to http://m.domain.com where http://m.domai…

---

## [Ngx\_openresty devel version 1.2.1.11 released](https://www.ruby-forum.com/t/ngx-openresty-devel-version-1-2-1-11-released/221946)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 6, 2012, 8:50pm UTC](https://www.ruby-forum.com/t/ngx-openresty-devel-version-1-2-1-11-released/221946 "2012-08-06T20:50:33Z")

</div>

Hello, guys! After one week’s active development, I’m pleased to announce the new development version of ngx\_openresty, 1.2.1.11: OpenResty® - Open source Below is the complete change log for this release, as compare…

---

## [Module variable get\_handler() runs before filter?](https://www.ruby-forum.com/t/module-variable-get-handler-runs-before-filter/221940)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 6, 2012, 10:27am UTC](https://www.ruby-forum.com/t/module-variable-get-handler-runs-before-filter/221940 "2012-08-06T10:27:34Z")

</div>

Good day, I am writing a filter module, that has to set a environment variable to a certain value, if a special condition is met. For example, if there is &flag=true in the arguments, I want the PHP to see a $\_SERVER…

---

## [How to tell ngnix where is my libevent?](https://www.ruby-forum.com/t/how-to-tell-ngnix-where-is-my-libevent/221938)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 6, 2012, 9:25am UTC](https://www.ruby-forum.com/t/how-to-tell-ngnix-where-is-my-libevent/221938 "2012-08-06T09:25:03Z")

</div>

since i build libevent myself, and install it to my home/install dir, i have checked auto/configure --help to find options related to libevent dir, but not find it, i have also tried to tell nginx the path of libevent…

---

## [Convert lighttpd rewrite rule to nginx](https://www.ruby-forum.com/t/convert-lighttpd-rewrite-rule-to-nginx/221647)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 18\
**Last updated:** [August 4, 2012, 2:12am UTC](https://www.ruby-forum.com/t/convert-lighttpd-rewrite-rule-to-nginx/221647 "2012-08-04T02:12:28Z")

</div>

I have the following simple lighttpd rewrite rule: $HTTP\["host"\] =~ "^(app\\.mydomain\\.com)$" { url.rewrite-once = ( "^\[^.\]\*$" =\> "controller.php/$1" ) } I am trying to port this rule to nginx and ha…

---

## [GeSHi language file for nginx config](https://www.ruby-forum.com/t/geshi-language-file-for-nginx-config/193809)

<div class="topic-metadata">

**Author:** [@brianmercer](https://www.ruby-forum.com/u/brianmercer)\
**Replies:** 4\
**Last updated:** [August 3, 2012, 4:12pm UTC](https://www.ruby-forum.com/t/geshi-language-file-for-nginx-config/193809 "2012-08-03T16:12:14Z")

</div>

Does anyone have a language file for nginx configurations for the GeSHI syntax highlighter? Or have you used other syntax highlighter definitions that I could use to make one? I’ve found one for vim so far on the we…

---

## [Change the root directory in nginx](https://www.ruby-forum.com/t/change-the-root-directory-in-nginx/221792)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 7\
**Last updated:** [August 3, 2012, 1:18pm UTC](https://www.ruby-forum.com/t/change-the-root-directory-in-nginx/221792 "2012-08-03T13:18:07Z")

</div>

Hi . How can I change the root directory in nginx?? Now my root directory is /usr/share/nginx/html. I want change it, like ~/web Posted at Nginx Forum:

---

## [Sub-domains through different /etc/nginx/sites-enabled entries?](https://www.ruby-forum.com/t/sub-domains-through-different-etc-nginx-sites-enabled-entries/221885)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 3, 2012, 11:27am UTC](https://www.ruby-forum.com/t/sub-domains-through-different-etc-nginx-sites-enabled-entries/221885 "2012-08-03T11:27:06Z")

</div>

Hello, I’m refining here my question that remained unanswered under the topic “Distribution of requests to multiple lxc containers” … Is it possible to distribute sub-domains of one domain through independent files/…

---

## [Location regular expression explanation](https://www.ruby-forum.com/t/location-regular-expression-explanation/221878)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [August 3, 2012, 9:17am UTC](https://www.ruby-forum.com/t/location-regular-expression-explanation/221878 "2012-08-03T09:17:56Z")

</div>

Hi, I was recently reading the PHPfastcgi example at PHP FastCGI Example | NGINX. When it talks about the configuration to avoid the exploit on uploads folder, there is a regulare expresion saying: location ~\* (^(?!…

---

## [Proxying webmin](https://www.ruby-forum.com/t/proxying-webmin/221870)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 2, 2012, 9:23pm UTC](https://www.ruby-forum.com/t/proxying-webmin/221870 "2012-08-02T21:23:56Z")

</div>

I sometime like to work in the quiet environs of the local library. They’ve recently blocked access to various ports, so I can’t ssh, sftp or even go to webmin which is usually at port 10000. I understand I can have …

---

## [Bad side effect of (even unmatched) nested regex locations in regex locations with anonymous capture](https://www.ruby-forum.com/t/bad-side-effect-of-even-unmatched-nested-regex-locations-in-regex-locations-with-anonymous-capture/221857)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 3\
**Last updated:** [August 2, 2012, 7:20pm UTC](https://www.ruby-forum.com/t/bad-side-effect-of-even-unmatched-nested-regex-locations-in-regex-locations-with-anonymous-capture/221857 "2012-08-02T19:20:37Z")

</div>

Hello! I have another interesting scenario :wink: Given is following minimized test case server { listen 80; server\_name t2.example.com; root …

---

## [Best practice on FastCGI configuration to avoid ambiguous FCGI\_PARAMS keys](https://www.ruby-forum.com/t/best-practice-on-fastcgi-configuration-to-avoid-ambiguous-fcgi-params-keys/221855)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 2\
**Last updated:** [August 2, 2012, 5:57pm UTC](https://www.ruby-forum.com/t/best-practice-on-fastcgi-configuration-to-avoid-ambiguous-fcgi-params-keys/221855 "2012-08-02T17:57:39Z")

</div>

Most of the times when configuring a FastCGI application it is just good enough to include the fastcgi.conf which ships with the Nginx distribution. On the other hand sometimes it is required to just change one or few…

---

## [How to set keys\_zone for proxy\_cache\_path on linux](https://www.ruby-forum.com/t/how-to-set-keys-zone-for-proxy-cache-path-on-linux/221861)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [August 2, 2012, 12:09pm UTC](https://www.ruby-forum.com/t/how-to-set-keys-zone-for-proxy-cache-path-on-linux/221861 "2012-08-02T12:09:56Z")

</div>

Hi, I was wondering how to set the keys\_zone parameter of the proxy\_cache\_path. The wiki says "Zone size should be set proportional to number of pages to cache. The size of the metadata for one page (file) depends o…

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

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