You may be able to use Apache's
mod_proxy
and VirtualHost
s to solve your problem. I suggest looking at ProxyPass, ProxyPassReverse, ProxyPreserveHost, and maybe also mod_rewrite
's rewriting directives.
A small example: I appended
<VirtualHost *>
ProxyPreserveHost On
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
<Location /hg/>
</Location>
</VirtualHost>
to /etc/httpd/conf/httpd.conf
on my Fedora 12 machine. Then, I (re)started Apache with service http restart
and separately ran hg serve
in a local Mercurial repository. With this setup, I could access the repository at http://localhost/hg/
.
You could also try this with a notebook server started with interface='localhost'
. In this case, the ProxyPreserveHost
directive is important --- it will fix the problem described at #8205.
However, I don't how well this works with secure servers and URLs. You may need to tweak the configuration further. Please let us know!
Why do you want to move it? Would a redirect from /sage back to the current address be ok?
We would like to move sage so that we can have other served applications at the same web site. For example we want a mercurial repository url http://our.computer.edu/hg We are flexible if you can think of alternate ways of doing this.