This is useful for creating a landing page for CollectionSpace so one can ignore the
:8180 port number as well as have Apache redirect you to the full site location if the user only knows the domain (and subdomain.) This is useful as remembering
demo.collectionspace.org is much nicer than remembering
OS:Ubuntu 10.04 LTS
First, make sure Apache is installed
Enable the proxy and rewrite modules. These are necessary for what we wish to accomplish.
Then restart apache.
Next, make sure proxying is turned on, which is usually turned off by default in Ubuntu. Edit
Next, create a new
virtual host for your CollectionSpace instance.
Here is a sample VH directive for the server at mmidev.collectionspace.org (220.127.116.11) saved as
The VH here will allow Apache to know what to serve when it gets a request for mmidev.collectionspace.org on port 80 (the default http port). Any requests for mmidev.collectionspace/* (port 80) will be sent to the tomcat server listening on port 8180. Apache acts as a proxy server in this case and rewrites all incoming and outgoing URLs so the URL can be 'prettified' by having the port number (8180) stripped out.
Next, we notify apache of the VH we want to enable. In this case, cspace
This will also create a symbolic link in apache's
Reload the apache configuration
Finally, we want to create a landing page that will redirect the user to the full app location.
Save this template to your canonical default apache webdirectory:
From here, the user can enter
mmidev.collectionspace.org and root index.html page will redirect them to
mmidev.collectionspace.org/collectionspace/ui/mmi/html/index.html. Apache will handle all requests in the default port and proxy them to tomcat listening on port 8180.