Wednesday, October 20, 2010

apache2 and sagemath both on port 80 using mod_proxy etc..

I want to run sage and apache2 both on port 80, but I can't do that. So a work around is to do port forwarding so it looks like like the user is on a regular website and they can't see the port numbers. I tried for too long just using mod rewrite but kept getting 403 and 500 errors. The final solution was really easy:

Put this in your HTTP.conf

DocumentRoot /var/www/sage/
ServerName sage.mysite.com
ServerAlias www.sage.mysite.com
ProxyRequests Off

Order deny,allow
Allow from all


ProxyPass / http://mysite.com:8000/
ProxyPassReverse / http://mysite.com:8000/

No comments: