Virtual Hosting
UGCS allows users to host virtual domains on UGCS. This way, you can have some other domain (like yoursite.com or yoursite.caltech.edu) be hosted on UGCS hosting. The easiest way to set up virtual hosting is to run create_vhost on any machine in UGCS. This script will prompt you for the domain name and document root for your virtual domain.
You will also have to get DNS for your domain set up. If your domain is under caltech.edu, you can email the Caltech hostmaster (hostmaster@caltech.edu) with a request to make your domain a CNAME for "www.ugcs.caltech.edu". Please do not make it a cname for posiedon- this may break in the future.
Details
Virtual host configurations are stored in /afs/.ugcs/drop/vhost/<username> This directory can be created by running
remctl demeter vhost setup
After the directory is set up, you can create a file in it with vhost details. The file is a series of field/value pairs separated by an = sign. It should contain the "docroot" and "name" fields. docroot is where the domain will be hosted about, and name is the domain name that should be used. An example for hosting the domain "test.caltech.edu" from "/afs/.ugcs/user/testuser/public/test is:
docroot=/afs/.ugcs/user/testuser/public/test name=test.caltech.edu
It can also contain "alias" and "cgibin" fields. An alias is another name for the server- if your server is "test.caltech.edu", you should include "test" as well so people who use the short name can access it as well.
The cgibin field specifies a cgi-bin for the server. If you don't include it, you won't have any cgi functionality. If it is specified, you will also be able to use files with a .cgi extension as cgi files.
After modifying this file, you should run
remctl demeter vhost update
to update the server configuration files. You do not have any other control over your virtual host apache configuration.
Logs
You can see access logs for your site in /afs/.ugcs/apache-logs/<username>/<vhost>.log Errors will also be in /afs/.ugcs/apache-logs/<username>/<vhost>-error.log
Restrictions
Remember, UGCS domains cannot be used to host commercial sites or other content that violates our acceptable use policy. You are also not allowed to host domains under .ugcs.caltech.edu.
Virtual hosts do not work with SSL. Anyone who goes to https://yourvirtualdomain will instead go to the main UGCS homepage.
