Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add base_url to notebook configuration options #1329

Closed
astraw opened this issue Jan 26, 2012 · 3 comments · Fixed by #1332
Closed

add base_url to notebook configuration options #1329

astraw opened this issue Jan 26, 2012 · 3 comments · Fixed by #1332
Labels
Milestone

Comments

@astraw
Copy link
Contributor

astraw commented Jan 26, 2012

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...

@ellisonbg
Copy link
Member

Some of the pieces are already in place, but more need to be done. We definitely should support this.

@astraw
Copy link
Contributor Author

astraw commented Jan 26, 2012

OK, I got most of the way there in my alternate-url-prefix branch.

The proxy configuration I need to run behind a firewall turns out to be a little more complicated than I hoped, but this is a server configuration things rather than anything to do with IPython per se.

Should I issue a pull request with this?

@ellisonbg
Copy link
Member

On Thu, Jan 26, 2012 at 3:27 PM, Andrew Straw
reply@reply.github.com
wrote:

OK, I got most of the way there in my alternate-url-prefix branch.

Great!

The proxy configuration I need to run behind a firewall turns out to be a little more complicated than I hoped, but this is a server configuration things rather than anything to do with IPython per se.

I have wondered how the WebSocket/proxy thing would work. Not too
surprised there are issues.

Should I issue a pull request with this?>

Yes, please.


Reply to this email directly or view it on GitHub:
#1329 (comment)

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

@fperez fperez closed this as completed in 69c627c Jan 29, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
notebook - allow prefixes in URL path.

This closes ipython#1329. The basic idea is to allow prefixes in the path served. (E.g. serve on http://localhost:8888/ipython/ instead of http://localhost:8888/ )

This is useful for running the ipython notebook behind a proxy serving other content at other URLs. In that case, one would also need to proxy the websockets.

Also, clean up some static paths in our html/css files by using template function calls instead of hardcoded paths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants