<div dir="ltr">Clare,<div><br></div><div>Can you update to the latest master? I think the never-ending redirects could be the result of a recently fixed typo.</div><div><br></div><div>Thanks,</div><div>-MinRK</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 23, 2014 at 10:01 PM, Clare Sloggett <span dir="ltr"><<a href="mailto:claresloggett@gmail.com" target="_blank">claresloggett@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Doug,<div><br></div><div>Thanks for this. I had actually just been thinking about about the NGINX redirect issue, and had assumed everything behind that would be fairly straightforward. But it sounds like you are saying there may be more fundamental issues, and to be honest I haven't tested that the redirect is definitely the source of all my problems.</div><div><br></div><div>It sounds like I need to do some more direct testing and come back!</div><div><br></div><div>In the meantime, if anyone has insight into what could be causing a URL rewrite like "<span style="font-size:12.7272720336914px;font-family:arial,sans-serif">/ipython/ipython/hub/ipython/</span><span style="font-size:12.7272720336914px;font-family:arial,sans-serif">ipython/hub/ipython/ipython/</span><span style="font-size:12.7272720336914px;font-family:arial,sans-serif">hub/ipython/ipython...." that could be really helpful.</span></div><div><span style="font-size:12.7272720336914px;font-family:arial,sans-serif"><br></span></div><div><span style="font-size:12.7272720336914px;font-family:arial,sans-serif">Cheers,</span></div><div><span style="font-size:12.7272720336914px;font-family:arial,sans-serif">Clare</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 13 October 2014 00:44, Doug Blank <span dir="ltr"><<a href="mailto:doug.blank@gmail.com" target="_blank">doug.blank@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>On Sun, Oct 12, 2014 at 1:35 AM, Clare Sloggett <<a href="mailto:claresloggett@gmail.com" target="_blank">claresloggett@gmail.com</a>> wrote:<br>><br>> Hi all,<br>><br>> Am I right in thinking this list is also the right place for questions about Jupyterhub?<br>><br>> I'm trying to set up Jupyterhub for multiple users, on the same server where we are running several other services. Currently there are NGINX redirects in place to these other services. I'd like to set up http://<public-url>/ipython/ to redirect to a port on localhost and run Jupyterhub over that port. Is this possible?<br>><br>> I've got this working in the past with single-user IPython Notebook. For that, I set config options c.NotebookApp.base_project_url, c.NotebookApp.base_kernel_url, and c.NotebookApp.webapp_settings to be aware of the ipython/ URL prefix. We used an NGINX redirect to forward requests and handle websockets properly, which looked like<br>><br>> location /ipython/ {<br>>     proxy_pass <a href="http://127.0.0.1:9510" target="_blank">http://127.0.0.1:9510</a>;<br>>     proxy_set_header Host $host;<br>>     proxy_set_header X-Real-IP $remote_addr;<br>>     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>>     proxy_set_header Upgrade $http_upgrade;<br>>     proxy_set_header Connection "upgrade";<br>>     }<br>><br>> This worked for the old single-user notebook. But, I'm not clear on the model Jupyterhub is using (and I'm not much of a sysadmin). I read through the command-line options, thought from them that I don't need to strip the /ipython/ from the incoming requests, and have tried using a similar redirect to the above and setting --JupyterHubApp.base_url='ipython/' and also setting --port 9510. This does seem to see the incoming requests but results in amusing requests like <br>><br>> 500 GET /ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/ipython/ipython/hub/......<br>><br>> ... so clearly I haven't understood what's going on. Does anyone have any pointers on how this should work? I haven't read any docs other than the README and the command-line parameter information, so apologies if there's something obvious that I didn't look at.<br>><br>> I'm also interested in running Jupyterhub as a daemon, so if that's something that's been done before and there's anything I should know, that would be great.<br><br></div></div>There is one other document, other than the README.md and the reported issues [1]:<br><br><a href="https://github.com/jupyter/jupyterhub/wiki/Using-sudo-to-run-the-server-as-non-root" target="_blank">https://github.com/jupyter/jupyterhub/wiki/Using-sudo-to-run-the-server-as-non-root</a><br><br>Despite the warning at the top of that page, you can make jupyterhub work on some systems (eg, Linux, such as Ubuntu) using sudo, but not as root. I suspect that this would be the recommended setup when jupyterhub is complete. One recent change is the ability to save/load state from a database. The wiki page above hasn't been updated with the note from this issue:<br><br><a href="https://github.com/jupyter/jupyterhub/issues/57" target="_blank">https://github.com/jupyter/jupyterhub/issues/57</a><br><br>It might be easier to start without NGINX, and then add it after you have a working jupyterhub system. It would be nice to have a little bash script to make this a "service" that would support "start", "top", and "status"... but I haven't had time. Currently, we're just becoming the non-root sudoer ("rhea" in the docs) and starting the server, something along the lines:<br><br>jupyterhub --LocalProcessSpawner.set_user=sudo --JupyterHubApp.ip=165.106.10.83 --JupyterHubApp.port=80 --db='sqlite:///:memory:' &>> /var/log/jupyterhub/log &<div><br></div><div>The next step for us is to get it running under https... looks like others have blazed that trail, so it looks possible.</div><div><br></div><div>If you have success, it would be great to add to the wiki docs... I suspect that many of us that aren't sys admins will be wanting to get this up and running.</div><div><br></div><div>-Doug<br><br>[1] - <a href="https://github.com/jupyter/jupyterhub" target="_blank">https://github.com/jupyter/jupyterhub</a><span><br><br>> Any help much appreciated!<br>><br>> Clare<br>><br>><br></span>> _______________________________________________<br>> IPython-dev mailing list<br>> <a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>><br></div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>