Ask Your Question

move sage server to from

asked 2010-09-13 12:21:30 -0500

tom gravatar image

Dear sage community,

Is there a simple way to move our sage server from to

We are running on Centos5.5 if it makes a difference.

Thanks for your time, Tom

edit retag flag offensive close merge delete


Why do you want to move it? Would a redirect from /sage back to the current address be ok?

ccanonc gravatar imageccanonc ( 2010-09-13 12:40:25 -0500 )edit

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 We are flexible if you can think of alternate ways of doing this.

tom gravatar imagetom ( 2010-09-13 15:09:09 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2010-09-15 09:22:53 -0500

tom gravatar image

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 and the hg respositories are visible on 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

(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!

edit flag offensive delete link more


That's great!

Mitesh Patel gravatar imageMitesh Patel ( 2010-09-15 11:28:18 -0500 )edit

answered 2010-09-13 15:33:50 -0500

Mitesh Patel gravatar image

updated 2010-09-13 21:21:38 -0500

You may be able to use Apache's mod_proxy and 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/>

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!

edit flag offensive delete link more


We are serving the web pages in the normal way with saged started with a command like /sbin/service saged start Can sage also run under apache? Is there a URL for a recipe for this?

tom gravatar imagetom ( 2010-09-13 15:48:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2010-09-13 12:21:30 -0500

Seen: 390 times

Last updated: Sep 15 '10