Skip to end of metadata
Go to start of metadata

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 demo.collectionspace.org/collectionspace/ui/core/html/index.html.

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 /etc/apache2/mods-enabled/proxy.conf

Next, create a new virtual host for your CollectionSpace instance.
Here is a sample VH directive for the server at mmidev.collectionspace.org (96.126.108.110) saved as /etc/apache2/sites-enabled/cspace

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 sites-enabled directory.

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: /var/www/index.html

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.

  • No labels