Website:VHost
From UGCS
[edit] 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.
[edit] 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.
[edit] 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:
- docroot: The document root for the virtual server. It needs to be under /afs/.ugcs/user/<username>
- name: The primary name for the server. You should use a FQDN here. You are not allowed to create virtual domains under ugcs.caltech.edu
- cgibin: A cgi-bin directory for your server. Like docroot, it needs to be under /afs/.ugcs/user/<username>. This parameter is optional (if you leave it out, you won't have a cgi-bin)
- aliases: Other names you want to be able to access the server at. Multiple values should be separated by spaces. If you have a caltech.edu host, you should have the part before .caltech.edu as an alias (as in the example)
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!

