On Sun, Oct 4, 2009 at 1:28 PM, kovzol <kov...@gmail.com> wrote: > > Dear All, > > I am new to sage-support, but I have been using Sage for a while with > good impressions! I have always been using www.sagenb.org, but now I > wanted to try it on a separate machine (Linux, Debian 5.0 Lenny). > > I am afraid that Sage currently does not support what I like to do: > > * My web server listens only to port 80 (Apache2). > * I would like to use my web server for other projects, not only Sage. > I do not want to install Sage into the (virtual) root directory of my > web server. > * Sage is installed in /home/sage from source. Everything works fine > (http://localhost:8000 is OK running locally). > * I tried ProxyPass-ing (described by the others earlier), but I had > to write many different lines for Sage: > > ProxyRequests Off > RewriteEngine On > ProxyPass /sage http://localhost:8000 > ProxyPassReverse /sage http://localhost:8000 > > ProxyPass /pub http://localhost:8000/pub > ProxyPass /login http://localhost:8000/login > ProxyPass /css http://localhost:8000/css > ProxyPass /images http://localhost:8000/images > ProxyPass /home http://localhost:8000/home > ProxyPass /settings http://localhost:8000/settings > > (And so on. I guess this is not enough. And ugly, too.) This works, > but I am not satisfied with this result. > > * In addition, "ProxyPassReverse /sage http://localhost:8000" was not > neccessary. Also "RewriteEngine On" was unneeded. > * Now I can see (using "netstat -anp | grep 8000" as root) that the > sage notebook process listens only on localhost. This makes Sage > notebook unavailable for calling it outside (from a different machine, > within a web browser) without setting up an Apache Proxy. > * As a conclusion, I do think Sage should be improved to handle this > problem. I do think the fix must not be too difficult. I would be > happy to help making this modification, allowing relative paths. But > first please confirm if I am right in pointing these problems out. > > Best regards, Zoltan Kovacs > assistant professor, Univ. of Szeged > http://wmi.math.u-szeged.hu/~kovzol
I solve the above problem by simply putting this in httpd.conf. This requires no change to sage at all: <VirtualHost *> RewriteEngine On ServerName sagenb.org ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ DocumentRoot / <Location /> DefaultType text/html </Location> </VirtualHost> Does this not work for you? Note that you have to configure your DNS with a name that points to the same IP address as your host. E.g., I configured my DNS so that sagenb.org points to the same IP address as the computer that hosts Sage. That said, I can't see any reason that the Sage notebook shouldn't *also* support relative paths too. Note that the notebook is under very active development this month, being "spun off" from Sage as a separate project, etc. -- William --~--~---------~--~----~------------~-------~--~----~ 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 For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---