Re: Client specified server port

2015-08-24 Thread ryd994
Hi, Maybe you can use following config which is shorter and does not use the evil "if". map $http_host $redirect_port { default ""; .*(:\d+) $1; } return 302 $scheme://$host$redirect_port/ On Tue, Aug 25, 2015, 06:35 Joó Ádám wrote: > Hi, > > The return directive allows the use of URLs

Re: Internal marked 503 error page returns default 404

2015-08-24 Thread ryd994
Hi Adam, Why not use @named location directly? error_page 503 @unavailable; location @unavailable { alias /absolute/path/to/file; } Notice the path is not related to document root. On Tue, Aug 25, 2015, 05:33 Joó Ádám wrote: Hi Francis, Thank you for your response. After some furth

Re: header handling

2015-08-14 Thread ryd994
Hi, 1) Use mapped variable map $http_ $ { "" "value if nit set"; default $http_; } Then you can set header with the new variable. 2) I guess you can use map, too. Use $upstream_http_*name* instead. 3) Sorry, I have no idea on this. On Sat, Aug 15, 2015, 00:51 Frank Liu wrote: >

Re: Removal of server from nginx load balancer does not reflect after nginx reload

2015-08-14 Thread ryd994
Hi, Are you using free Nginx or Nginx Plus? Per my memory, server group reconfigure without restart is a Plus only feature. On Fri, Aug 14, 2015, 14:20 dhirajp...@gmail.com wrote: > Hi, > I am using nginx 1.8.0 as a load balancer. > > Below is the configuration snippet: > > upstream app

Re: Rewrite rules for "random" subfolders

2015-08-14 Thread ryd994
Hi, Does this work? rewrite ^(.*)/(.*)-single\.php $1/single. php?id=$2 last; Not tested, so anything could happen. On Fri, Aug 14, 2015, 18:22 Muffel2k wrote: > Hey, > > I would like to migrate my page from a webhoster to my own vServer running > Nginx. So far I got everything up and running

Re: uWSGI - upstream prematurely closed connection while reading response header from upstream

2015-07-03 Thread ryd994
It sounds like uwsgi setting problem. Prematurely closed connection means Nginx is not expecting that. On Fri, Jul 3, 2015, 00:45 ajjH6 wrote: > Any ideas? I just want to run a uWSGI app for more than 60 seconds? > > Posted at Nginx Forum: > http://forum.nginx.org/read.php?2,259882,260022#msg-26

Re: Convert Apache .htaccess rewrite to nginx

2015-06-25 Thread ryd994
On Wed, Jun 24, 2015, 15:31 nngin wrote: searching the site, i found that this same question goes unanswered. Please point me in the right direction of where i would be able to get help. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259810,259876#msg-259876 __

Re: Caching fastcgi url

2015-06-24 Thread ryd994
On Tue, Jun 23, 2015 at 6:27 PM CJ Ess wrote: > So looks like your saying the best way to do it is to do a separate > location and duplicate the fastcgi setup in that location and add the > fastcgi_cache stuff. > > I can work with that, however I came across this example while googling ( > https:

Re: Deploying newly compiled nginx from test server to production

2015-06-16 Thread ryd994
again if you cut off too much. Shouldn't take long. I never used modsec before, so I can't help with the APR issue. Maybe you should rebuild and install apr first. Regards, On Mon, Jun 15, 2015 at 11:59 PM ajjH6 wrote: > Thanks ryd994. > > I eventually build the RPM ok. > >

Re: Deploying newly compiled nginx from test server to production

2015-06-15 Thread ryd994
I would prefer RPM. Just patching the official one. RPM patching process is pretty standardized and shouldn't take more than a few minutes. Could you explain what problem you have? On Mon, Jun 15, 2015, 05:59 ajjH6 wrote: > Hello > > What is a good method for deploying a newly compiled nginx bi

Re: 答复: 答复: nginx plus with ssl on TCP load balance not work

2015-06-14 Thread ryd994
As long as you get something from your backend, I don't see anything could be wrong on the proxy. Backend get the connection, that's all. I guess it was because your backend get frustrated for all incoming requests being from frontend. HTTP proxy can pass client IP info by "X-Forwarded-For". That

Re: Redirect on specific threshold !!

2015-06-14 Thread ryd994
Does a nginx reverse proxy with cache fit you need? Client -> Caching server (with SSD and nginx proxy cache configured) -> Storage server(s) (Slow) You can add even more storage server by utilizing nginx upstream module. On Sun, Jun 14, 2015 at 1:12 PM shahzaib shahzaib wrote: > Hi, > >We

Re: Dynamic configuration

2015-06-14 Thread ryd994
IMHO, it's too much to explain in a few lines. Did you read http://nginx.org/en/docs/beginners_guide.html ? Then you might want to read about rewrite module, fcgi and php, and configure your application to output correct link or use subs module. If you know how to use hosts file, use it with nginx

Re: Nginx LUA

2015-06-14 Thread ryd994
I would suggest using some log parser. You can find some by searching. Those "for Apache" ones would also work. If you know some python or shell script, writing one yourself won't take more than a few minutes. Analyzing access log on the fly just doesn't make much sense. On Sun, Jun 7, 2015 at 10:

Re: Add header based on fastcgi response

2015-06-02 Thread ryd994
On Tue, Jun 2, 2015 at 5:04 PM Szépe Viktor wrote: Could anyone comment on this? Idézem/Quoting Szépe Viktor : > Good morning! > > I'd like to add a X-Fastcgi-Cache header when there is a fastcgi > cache hit, when the response is stored to or retrieved from the cache. > > add_header X-Fastcgi-