RewriteEngine on
<Location /galaxy-dev/ipython/>
</Location>
Now that all that is set up, until galaxy's interactive_environments.py can be updated, you have to manually correct the URLs from mako:
--- a/config/plugins/interactive_environments/ipython/templates/ipython.mako
+++ b/config/plugins/interactive_environments/ipython/templates/ipython.mako
@@ -36,8 +36,8 @@ else:
## General IE specific
# Access URLs for the notebook from within galaxy.
-notebook_access_url = ie_request.url_template('${PROXY_URL}/ipython/${PORT}/notebooks/ipython_galaxy_notebook.ipynb')
-notebook_login_url = ie_request.url_template('${PROXY_URL}/ipython/${PORT}/login?next=%2Fipython%2F${PORT}%2Ftree')
+notebook_access_url = ie_request.url_template('${PROXY_URL}/galaxy-dev/ipython/${PORT}/notebooks/ipython_galaxy_notebook.ipynb')
+notebook_login_url = ie_request.url_template('${PROXY_URL}/galaxy-dev/ipython/${PORT}/login?next=%2Fipython%2F${PORT}%2Ftree')
With this, it's pretty close, however the containers aren't yet aware of the new URL they're to be accessed under:
From 76bf20de305d64e544911a86ea5d0cb03e4281bd Mon Sep 17 00:00:00 2001
From: Eric Rasche <esr@tamu.edu>
Date: Thu, 16 Jul 2015 12:00:47 -0500
Subject: [PATCH] Use galaxy prefix to build a full URL
---
ipython_notebook_config.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ipython_notebook_config.py b/ipython_notebook_config.py
index 3d9780d..4ec4675 100644
--- a/ipython_notebook_config.py
+++ b/ipython_notebook_config.py
@@ -21,8 +21,9 @@ if os.environ.get('DOCKER_PORT', 'none') == 'none':
c.NotebookApp.base_url = '/ipython/'
c.NotebookApp.webapp_settings = {'static_url_prefix': '/ipython/static/'}
else:
- c.NotebookApp.base_url = '/ipython/%s/' % os.environ['DOCKER_PORT']
- c.NotebookApp.webapp_settings = {'static_url_prefix': '/ipython/%s/static/' % os.environ['DOCKER_PORT']}
+ url_base = '%s/ipython/%s/' % ("galaxy-dev", os.environ['DOCKER_PORT'])
+ c.NotebookApp.base_url = url_base
+ c.NotebookApp.webapp_settings = {'static_url_prefix': '%s/static/' % (url_base, os.environ['DOCKER_PORT'])}
if os.environ.get('NOTEBOOK_PASSWORD', 'none') != 'none':
c.NotebookApp.password = os.environ['NOTEBOOK_PASSWORD']
--
2.3.5 With the above patch applied, and the container rebuilt (remember to specify it in ipython.ini), everything SHOULD work.
This will all be corrected by the next Galaxy release so that containers are automatically aware of proxies, and all of this is handled slightly more sensibly.
Cheers,
Eric