Virtual Hosting

UGCS now offers virtual hosting. This is used if you have a domain, say example.com, and you want UGCS to serve content for it out of your UGCS home directory.

Easy Way

The easiest way to create a vhost is to use the create-vhost script. From a shellserver, run

create-vhost

It will prompt you for the domain name and document root, and then create the file and update the server configuration.

Detailed Instructions

First, you need to create a drop directory. You only need to do this step once.

remctl poseidon vhost setup

Then you need to create a configuration file. It's a pretty simple file format: any line beginning with # is ignored, blank lines are ignored. Parameter names are separated from values by an "=" sign. You need the following parameters:

An example is below:

name=jdtest.caltech.edu
docroot=/afs/.ugcs/user/test/public/jdtest.caltech.edu
aliases=jdtest

This file should go in /afs/.ugcs/drop/vhost/<username>/. You can give it whatever name you want, although we suggest using the server name to keep things simple (this will also help us find the file in case you need help debugging strange issues).

Once you have created your configuration file, you need to update the server vhost list:

remctl poseidon vhost update

This command will tell you if you have any errors. If not, it will update the server configuration and you'll be set!