On 8/25/12 10:22 AM, Jason Grout wrote:
On 8/25/12 10:12 AM, Stefan wrote:
Hello everyone,

I compiled and installed Sage 5.2 on my homeserver which worked fine
and so the commandline version did.
Then I tried to make sage available fom the Internet with notebook().
I found some instructions about configuring apache, so access to Sage
is carried through an internal proxy, which worked partly fine. Sage
IS accessible - I can see the login screen, but the webpage has
nothing like CSS or Images and I cannot login, because he tries to
look up everything in the root directory of my Webserver. In this case
by root directory i mean the kind of root directory you can access on
a webpage not the servers root directory.
I configured once the virtual host so the documentroot was the
directory, sage should be mapped on and the CSS and the Images were
found.
How can I make Sage accessible on the Internet within a non root
directory like http://example.com/sagemath/ without creating a virtual
host on a different port or using another Domain? Is there any way of
adjusting the (absolute) directory with a single variable somewehere
hid in the sourcecode?

Some more Information:
I'm running Ubuntu Server
Sage itself is located in /opt/sagemath which is NOT Apaches Document
Root


Thanks in advance,
I hope someone can help me out.

I don't think there's an easy way to do that right now.  I think some
things in Sage notebook are hardcoded to refer to the root directory.  I
(and others) worked on this a long time ago, but I don't think we got it
to a point where it was quite usable.

You are more than welcome to look into how to change these URLs.  They
are mostly in the html template directory:
https://github.com/sagemath/sagenb/tree/master/sagenb/data/sage/html.
For example,
https://github.com/sagemath/sagenb/blob/master/sagenb/data/sage/html/base.html
shows lots of URLs that use the root.  Instead, they should be using
url_for: http://flask.pocoo.org/docs/api/#flask.url_for


On the other hand, it might be much faster to use relative URLs and the html base tag: http://www.w3.org/TR/html401/struct/links.html#h-12.4

Thanks,

Jason


--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to