<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, <div><br></div><div>I once developped a prof of concept of node proxy able to do a arbitrary mapping between urls and notebook </div><div><br></div><div>NPM</div><div><a href="https://npmjs.org/package/ipython-notebook-proxy">https://npmjs.org/package/ipython-notebook-proxy</a></div><div><br></div><div>Github</div><div><a href="https://github.com/Carreau/IPython-notebook-proxy">https://github.com/Carreau/IPython-notebook-proxy</a></div><div><div><div><br></div><div>You can even add/remove servers on the fly if needed. </div><div><br></div><div>I just don't have enough time to manage it but the code is pretty simple (120 LOC, white line included)</div><div>So you should be able to figure out how to adapt to your needs. </div><div>-- </div><div>Matthias</div><div><br></div><div><br></div><div><br></div><div><br></div><div>Le 7 juin 2013 à 09:53, epi a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi All,<div><br></div><div>I'm using IPython Notebook with a group of researcher at my university everything was working fine [1] </div><div>but unfortunately they are stopping my services because they don't allow me to use expose to the whole internet the IP:PORT where the IPython instances are running.</div><div><br></div><div>that's frustrating because i had to "quit" the services and now people is stuck with their work, no-more available :(</div><div><br></div><div><br></div><div>i tried to set up a proxy with apache, but afaik apache doesn't like websoket .</div><div><br></div><div>i tried enabling the mod_proxy, mod_proxy_html, mod_proxy_http and in the 000-defaults file under /etc/apache2/sites-enabled, </div><div>I put the following lines:</div><div><br></div><div> ProxyPass /ipython1 <a href="http://localhost:8080/">http://localhost:8080</a></div><div><br></div><div><div> <Location /ipython1></div><div> Order allow,deny</div><div> Allow from All </div><div> ProxyPassReverse /</div><div> #ProxyHTMLExtended On</div><div> ProxyHTMLURLMap / /ipython1/ c</div><div> SetOutputFilter proxy-html</div><div> </Location></div></div><div><br></div><div>but the page will not render properly.</div><div><br></div><div><br></div><div><br></div><div>Googling i came across IPython-Hydra and IPython-Proxy</div><div>and at this link <a href="https://github.com/cni/ipython-hydra/issues/1">https://github.com/cni/ipython-hydra/issues/1</a> </div><div>is described exactly what i was looking for </div><div><br></div><div>i tried to set up IPython-notebook-proxy but i got the same result of using apache proxy (no js/css loaded)</div><div><br></div><div><br></div><div>i also tried to setup ipython-hydra but it gave me :</div><div><br></div><div><div>[Wed Jun 05 06:25:28 2013] [error] [client 127.0.0.1] PHP Fatal error: require_once(): Failed opening required 'Logging.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/ipython-hydra.php on line 2</div></div><div><br></div><div><br></div><div>thank you for any help!</div><div><br></div><div><br></div><div><br></div><div><br></div><div>[1]</div><div>###</div><div>the non-solution i was using :</div><div><br></div><div>I added on a linux machine N unix-users and add in "crontab -e" :</div><div><br></div><div>@reboot /bin/sh /usr/local/bin/ipython.sh</div><div><br></div><div><br></div><div># where "ipython.sh" is a script to export few environment vars and run an ipython notebook with a specific profile (where the --port is specified)</div><div><br></div><div><br></div><div>this ends that at each reboot all the unix users have a running notebook on their specific port.</div><div><br></div><div>then from the apache root directory "/var/ww/" i stored a set of html file :</div><div><br></div><div>"/var/www/ipython/user1.html"</div><div>…</div><div>"/var/www/ipython/userN.html"</div><div><br></div><div>with this code in it :</div><div><br></div><div><br></div><div><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"</span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); ">"<a href="http://www.w3.org/TR/html4/strict.dtd">http://www.w3.org/TR/html4/strict.dtd</a>"></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><html></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><head></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><title>MySite</title></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><META name="description" content="MySite"><META name="keywords" content="MySite"></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "></head></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><frameset rows="100%,*" border="0"></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><frame src="<a href="http://LOCALNETWORK-IP:USER_PORT">http://LOCALNETWORK-IP:USER_PORT</a>" frameborder="0" /></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><frame frameborder="0" noresize /></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "></frameset></span><br style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "><span style="font-size: 12px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica; text-align: -webkit-left; background-color: rgb(255, 255, 255); "></html></span></div><div>###</div><div><br></div><div><br></div><div><br></div></div>_______________________________________________<br>IPython-dev mailing list<br><a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>http://mail.scipy.org/mailman/listinfo/ipython-dev<br></blockquote></div><br></div></body></html>