Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Thanks a ton Lucas .. moved to map :) Thanks a ton again !!! Thanks and Regards, Ajay On Sun, Apr 9, 2017 at 9:17 PM, Lucas Rolff wrote: > In general try to avoid using the if directive too much. > https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/ > > For what you're trying t

Re: nginScript and accessing cookies

2017-04-09 Thread Jeff Dyke
at first glance i thought this may be dead, but perhaps you'd should look here: https://www.nginx.com/blog/introduction-nginscript/, which supports both Plus and OSS versions. I've been working with the lua module via nginx-extras on ubuntu, they suit my needs, but that page may help you. Jeff O

nginx ngx_http_js_module debug

2017-04-09 Thread Unsay Mono via nginx
I've noticed there is a second ngx_http_js_module which, based on the name, is used for debugging. Can someone shine some light on what exactly the debug version of the module does differently and how it's used? Kind regards Andreas ___ nginx mailing li

nginScript and accessing cookies

2017-04-09 Thread Unsay Mono via nginx
Hey everyone In this nginx news article the author states: > With nginScript you can route traffic based on any data in the request, > including cookies, headers, arguments, or any keywords in the request body. So far I've been unable to find any documentation on how to read and write to cookies

Re: URL-Rewriting not working

2017-04-09 Thread Lucas Rolff
In general try to avoid using the if directive too much. https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/ For what you're trying to do, using a map would be the cleanest (and nicest) way I believe – someone can correct me if they want :-D From: nginx mailto:nginx-boun...@nginx.o

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Hi Francis. On Sun, Apr 9, 2017 at 8:47 PM, Francis Daly wrote: > On Sun, Apr 09, 2017 at 06:36:51PM +0530, Ajay Garg wrote: > > Hi there, > > > Got it Francis !! > > Good news. > > > location / { > > auth_basic 'Restricted'; > >

Re: URL-Rewriting not working

2017-04-09 Thread Francis Daly
On Sun, Apr 09, 2017 at 06:36:51PM +0530, Ajay Garg wrote: Hi there, > Got it Francis !! Good news. > location / { > auth_basic 'Restricted'; > auth_basic_user_file > /home/20da689b45c84f2b80bc84d651

Re: Mechanism to avoid restarting nginx upon every change

2017-04-09 Thread Ajay Garg
Thanks a ton Lucas. Just checked reloading, and the previous proxy-session was intact !! Thanks a ton again. And sorry I missed your name in the credits, you too had helped a greate deal yesterday, and today too !! Thanks a ton again !!! Thanks and Regards, Ajay On Sun, Apr 9, 2017 at 7:29 PM,

Re: Mechanism to avoid restarting nginx upon every change

2017-04-09 Thread Lucas Rolff
Hi Ajay, If you generate the configuration, and issue a nginx reload – it won't cause any downtime. The master process will reread the configuration, start new workers, and gracefully shut down the old ones. There's absolutely no downtime involved in this process. From: nginx mailto:nginx-boun

Mechanism to avoid restarting nginx upon every change

2017-04-09 Thread Ajay Garg
Hi All. We are wanting to implement a solution, wherein the user gets proxied to the appropriate local-url, depending upon the credentials. Following architecture works like a charm (thanks a ton to fran...@daoine.org, without whom I would not have been able to reach here) ::

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Got it Francis !! server { listen 2001 ssl; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; location / { auth_basic 'Restricted';

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Hi Francis. Thanks a ton for your suggestions. On Sun, Apr 9, 2017 at 5:58 PM, Francis Daly wrote: > On Sun, Apr 09, 2017 at 05:27:31PM +0530, Ajay Garg wrote: > > Hi there, > > > Unfortunately, our backen-service(s) (on port 2000 in the example) is > > ssh-reverse-tunnel, having two layers of

Re: URL-Rewriting not working

2017-04-09 Thread Francis Daly
On Sun, Apr 09, 2017 at 05:27:31PM +0530, Ajay Garg wrote: Hi there, > Unfortunately, our backen-service(s) (on port 2000 in the example) is > ssh-reverse-tunnel, having two layers of machines behind them. The > terminating-node for sure cannot be changed. "In general", reverse-proxying to a dif

Re: URL-Rewriting not working

2017-04-09 Thread Ajay Garg
Hi Francis. Thanks for your detailed analysis. Unfortunately, our backen-service(s) (on port 2000 in the example) is ssh-reverse-tunnel, having two layers of machines behind them. The terminating-node for sure cannot be changed. Looking at your explanations, I guess then we will have to open a p

Re: URL-Rewriting not working

2017-04-09 Thread Francis Daly
On Sat, Apr 08, 2017 at 06:39:59PM +0530, Ajay Garg wrote: Hi there, > However, I am not able to do the proxying if I perform url-rewriting. > Nothing of the following works :: Note that if you want to reverse-proxy a back-end web service at a different part of the url hierarchy to where it beli