ipython/ipython — Issue #1329: add base_url to notebook configuration options
Author: astraw
Created: 2012-01-26 00:23:50+00:00
State: open

Hi,

(Apologies if this is already possible - I didn't find it anywhere.)

I'd like to serve my notebook behind a proxy server. For example, comsider nginx running on http://somewhere.com and serving all URLS matching the regex http://somewhere.com/ipython/astraw/(.*) by proxying them to http://localhost:8888/ipython/astraw/$1. In particular, this is proxying without URL rewriting.

To do this, I think two changes need to be made to the source: 1) change the handlers specified to tornado.web.Application so that they specify a base_url before their current name. 2) have all URL emitters (e.g. "/static/blah/blah") also have the base_url (e.g. emit base_url+"/static/blah/blah" instead).

Does this make sense? Is there a way to do it already? If so, I missed it after looking for some time, but apologies nevertheless.

Thanks for the notebook interface. I am dreaming big with this...