<div>But long live sessions are closed and I've had lua session information persist with a reload. Needed a restart </div><div><br></div><div>A<br><div class="gmail_quote"><div>On Sun, 9 Apr 2017 at 21:35, B.R. via nginx <<a href="mailto:nginx@nginx.org">nginx@nginx.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="gmail_default gmail_msg" style="font-size:small;color:rgb(51,51,153)">You could have got your answer yourself by Reading The... Fine? Manual:<br class="gmail_msg"><a href="https://nginx.org/en/docs/control.html" class="gmail_msg" target="_blank">https://nginx.org/en/docs/control.html</a><br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_default gmail_msg" style="font-size:small;color:rgb(51,51,153)">There are tons of interesting pieces of informations there, by the nature of said docs...<br class="gmail_msg"></div><div class="gmail_extra gmail_msg"><div style="font-size:small;color:rgb(51,51,153)" class="gmail_default gmail_msg">I suggest you take a look at everything: <a href="https://nginx.org/en/docs/" class="gmail_msg" target="_blank">https://nginx.org/en/docs/</a></div><div class="gmail_msg"><div class="m_7051444327093116565gmail_signature gmail_msg" data-smartmail="gmail_signature"><font size="1" class="gmail_msg"><span style="color:rgb(102,102,102)" class="gmail_msg">---<br class="gmail_msg"></span><b class="gmail_msg"><span style="color:rgb(102,102,102)" class="gmail_msg">B. R.</span></b><span style="color:rgb(102,102,102)" class="gmail_msg"></span></font></div></div></div></div><div class="gmail_msg"><div class="gmail_extra gmail_msg">
<br class="gmail_msg"><div class="gmail_quote gmail_msg">On Sun, Apr 9, 2017 at 4:25 PM, Ajay Garg <span class="gmail_msg"><<a href="mailto:ajaygargnsit@gmail.com" class="gmail_msg" target="_blank">ajaygargnsit@gmail.com</a>></span> wrote:<br class="gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Thanks a ton Lucas.<br class="gmail_msg"><br class="gmail_msg"></div>Just checked reloading, and the previous proxy-session was intact !!<br class="gmail_msg"></div>Thanks a ton again.<br class="gmail_msg"><br class="gmail_msg"></div>And sorry I missed your name in the credits, you too had helped a greate deal yesterday, and today too !!<br class="gmail_msg"></div>Thanks a ton again !!!<br class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg"></div>Thanks and Regards,<br class="gmail_msg"></div>Ajay<br class="gmail_msg"></div><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg"><div class="m_7051444327093116565h5 gmail_msg">On Sun, Apr 9, 2017 at 7:29 PM, Lucas Rolff <span class="gmail_msg"><<a href="mailto:lucas@lucasrolff.com" class="gmail_msg" target="_blank">lucas@lucasrolff.com</a>></span> wrote:<br class="gmail_msg"></div></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_msg"><div class="m_7051444327093116565h5 gmail_msg">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">Hi Ajay,</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">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.</div>
<div class="gmail_msg">There's absolutely no downtime involved in this process.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">
<div id="m_7051444327093116565m_2283995562650823769m_-3545107808673131547MAC_OUTLOOK_SIGNATURE" class="gmail_msg"></div>
</div>
</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<span id="m_7051444327093116565m_2283995562650823769m_-3545107808673131547OLK_SRC_BODY_SECTION" class="gmail_msg">
<div style="font-family:Calibri;font-size:12pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt" class="gmail_msg">
<span style="font-weight:bold" class="gmail_msg">From: </span>nginx <<a href="mailto:nginx-bounces@nginx.org" class="gmail_msg" target="_blank">nginx-bounces@nginx.org</a>> on behalf of Ajay Garg <<a href="mailto:ajaygargnsit@gmail.com" class="gmail_msg" target="_blank">ajaygargnsit@gmail.com</a>><br class="gmail_msg">
<span style="font-weight:bold" class="gmail_msg">Reply-To: </span>"<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a>" <<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a>><br class="gmail_msg">
<span style="font-weight:bold" class="gmail_msg">Date: </span>Sunday, 9 April 2017 at 15.55<br class="gmail_msg">
<span style="font-weight:bold" class="gmail_msg">To: </span>"<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a>" <<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a>><br class="gmail_msg">
<span style="font-weight:bold" class="gmail_msg">Subject: </span>Mechanism to avoid restarting nginx upon every change<br class="gmail_msg">
</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<span class="gmail_msg">
<blockquote id="m_7051444327093116565m_2283995562650823769m_-3545107808673131547MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg"><span class="gmail_msg">
<div class="gmail_msg">Hi All.<br class="gmail_msg">
<br class="gmail_msg">
</div>
<div class="gmail_msg">We are wanting to implement a solution, wherein the user gets proxied to the appropriate local-url, depending upon the credentials.<br class="gmail_msg">
</div>
</span><div class="gmail_msg">Following architecture works like a charm (thanks a ton to<span class="m_7051444327093116565m_2283995562650823769m_-3545107808673131547gmail-go gmail_msg"><a href="mailto:francis@daoine.org" class="gmail_msg" target="_blank">francis@daoine.org</a></span>, without whom I would not have been able to reach here) ::<br class="gmail_msg">
<br class="gmail_msg">
</div><span class="gmail_msg">
<div class="gmail_msg">####################################################<br class="gmail_msg">
server {<br class="gmail_msg">
listen 2000 ssl;<br class="gmail_msg">
<br class="gmail_msg">
ssl_certificate /etc/nginx/ssl/nginx.crt;<br class="gmail_msg">
ssl_certificate_key /etc/nginx/ssl/nginx.key;<br class="gmail_msg">
<br class="gmail_msg">
location / {<br class="gmail_msg">
auth_basic 'Restricted';<br class="gmail_msg">
auth_basic_user_file /etc/nginx/ssl/.htpasswd;<br class="gmail_msg">
<br class="gmail_msg">
if ($remote_user = "user1") {<br class="gmail_msg">
proxy_pass <a href="https://127.0.0.1:2000" class="gmail_msg" target="_blank">
https://127.0.0.1:2001</a>;<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
if ($remote_user = "user2") {<br class="gmail_msg">
proxy_pass <a href="https://127.0.0.1:2000" class="gmail_msg" target="_blank">
https://127.0.0.1:2002</a>;<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
</div>
# and so on ....<br class="gmail_msg">
<div class="gmail_msg"><br class="gmail_msg">
}<br class="gmail_msg">
}<br class="gmail_msg">
####################################################<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</div>
<div class="gmail_msg">Things are good, except that adding any new user information requires reloading/restarting the nginx server, causing (however small) downtime.<br class="gmail_msg">
<br class="gmail_msg">
</div>
<div class="gmail_msg">Can this be avoided?<br class="gmail_msg">
</div>
<div class="gmail_msg">Can the above be implemented using some sort of database, so that the nginx itself does not have to be down, and the "remote_user <=> proxy_pass" mapping can be retrieved from a database instead?<br class="gmail_msg">
<br class="gmail_msg">
</div>
<div class="gmail_msg">Will be grateful for pointers.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</div>
<div class="gmail_msg">Thanks and Regards,<br class="gmail_msg">
</div>
<div class="gmail_msg">Ajay<br class="gmail_msg">
</div>
</span></div>
</div>
</div>
</blockquote>
</span></span>
</div>
<br class="gmail_msg"></div></div>_______________________________________________<br class="gmail_msg">
nginx mailing list<br class="gmail_msg">
<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a><br class="gmail_msg">
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" class="gmail_msg" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><span class="m_7051444327093116565HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><br class="gmail_msg"></font></span></blockquote></div><span class="m_7051444327093116565HOEnZb gmail_msg"><font color="#888888" class="gmail_msg"><br class="gmail_msg"><br clear="all" class="gmail_msg"><br class="gmail_msg">-- <br class="gmail_msg"><div class="m_7051444327093116565m_2283995562650823769gmail_signature gmail_msg" data-smartmail="gmail_signature">Regards,<br class="gmail_msg">Ajay<br class="gmail_msg"></div>
</font></span></div>
<br class="gmail_msg">_______________________________________________<br class="gmail_msg">
nginx mailing list<br class="gmail_msg">
<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a><br class="gmail_msg">
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" class="gmail_msg" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br class="gmail_msg"></blockquote></div><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
nginx mailing list<br class="gmail_msg">
<a href="mailto:nginx@nginx.org" class="gmail_msg" target="_blank">nginx@nginx.org</a><br class="gmail_msg">
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" class="gmail_msg" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div></div>