Success! The saged and apache serving of hg are running together. We did not change anything on the sage server which serves sage through the standard https://our.computer.edu:8000/ and the hg respositories are visible on http://our.computer.edu/hg We followed the suggestion of using (actually the default!) VirtualHost settings in apache
<VirtualHost *> ServerSignature email DirectoryIndex index.php index.html index.htm index.shtml LogLevel warn HostNameLookups off </VirtualHost>
(note we found no proxy... directives were necessary) and used the usual ScriptAlias /hg /our/path/to/hgweb.cgi It took us a while because there are so many little things to check; permissions, and selinux, but finally it worked in this super simple way!
You may be able to use Apache's
VirtualHosts 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>
/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
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!
Asked: 2010-09-13 12:21:30 -0500
Seen: 382 times
Last updated: Sep 15 '10