Ask Your Question

CarlF's profile - activity

2012-03-20 19:06:44 +0200 received badge  Nice Question (source)
2012-03-17 23:37:07 +0200 received badge  Student (source)
2012-03-16 10:40:00 +0200 asked a question Notebook under application path

I've installed a sage notebook and I'm trying to configure it as an application on a main web server (i.e. https://servername/sage/). I've used apache mod_proxy_http to rewrite the urls and point them to https://localhost:8000/, but some are sneaking in (through javascript, I think). In an attempt to work around this, I've added mod_proxy redirects from https://servername/home/ to https://localhost:8000/home and https://servername/javascript to https://localhost:8000/javascript.

It seems like I'm doing something wrong. This approach is very clumsy, and javascript POST requests to /home/ return 405 errors (method not allowed). Is there a way to configure the sage notebook base url to be something other than "/"?

Here's the relevant snippet of my apache ssl.conf:

ProxyPass /sage/ https://localhost:8000/
ProxyPassReverse /sage/ https://localhost:8000/

ProxyPass /javascript/ https://localhost:8000/javascript/
ProxyPassReverse /javascript/ https://localhost:8000/javascript/

ProxyPass /home/ https://localhost:8000/home/
ProxyPassReverse /home/ https://localhost:8000/home/

ProxyPassReverseCookiePath /sage/ https://localhost:8000/
ProxyHTMLURLMap https://localhost:8000/ /sage/
ProxyHTMLURLMap https://localhost:8000/ /sage/

<Location /home/>
        ProxyPassReverse /
</Location>

<Location /sage/>
        ProxyPassReverse /
        ProxyHTMLEnable On
        ProxyHTMLURLMap / /sage/
        RequestHeader unset Accept-Encoding
# http://some.app.intranet/ /my-gateway/
</Location>