Ask Your Question
2

move sage server to host.edu/sage from host.edu

asked 2010-09-13 19:21:30 +0100

tom gravatar image

Dear sage community,

Is there a simple way to move our sage server from https://our.computer.edu:8000 to https://our.computer.edu:8000/sage?

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

Thanks for your time, Tom

edit retag flag offensive close merge delete

Comments

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 19:40:25 +0100 )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 http://our.computer.edu/hg We are flexible if you can think of alternate ways of doing this.

tom gravatar imagetom ( 2010-09-13 22:09:09 +0100 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2010-09-15 16:22:53 +0100

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

edit flag offensive delete link more

Comments

That's great!

Mitesh Patel gravatar imageMitesh Patel ( 2010-09-15 18:28:18 +0100 )edit
1

answered 2010-09-13 22:33:50 +0100

Mitesh Patel gravatar image

updated 2010-09-14 04:21:38 +0100

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

edit flag offensive delete link more

Comments

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 22:48:14 +0100 )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

Stats

Asked: 2010-09-13 19:21:30 +0100

Seen: 1,010 times

Last updated: Sep 15 '10