Documentation:Web basics

=Web Hosting=

UGCS offers web hosting for all of its accounts.

Basics
UGCS homepages can be accessed at http://www.ugcs.caltech.edu/~username  To make a file visible here, put it in ~/public/html (or /afs/.ugcs/user/ /public/html)  PHP scripts may be placed anywhere under ~/public/html. CGI scripts are accessable at http://www.ugcs.caltech.edu/~username/cgi-bin, and may be placed in ~/public/cgi-bin (they must be executable)

If you want to see your log messages, they are in /afs/.ugcs/apache-logs/username. Almost all errors from your webspace will be in error.log, and vhost log messages will be in a file named for the appropriate vhost.

Scripting
All scripts are run through SUID wrappers. All scripts are run with your UID, group ID, and the AFS and Kerberos username "username_cgi".

AFS Access
For your page to be served, the directory must be readable by the AFS user "www-data". By default, directories under ~/public/ are world-readable (system:anyuser read). See AFS for information on setting up ACL's.

Since scripts are run under "username_cgi", your script must also be readable by "username_cgi" in order for it to run. In addition, the directory must be at least listable (AFS permission "l") by www-data, otherwise the web server won't realize that the file actually exists.

Other services
UGCS offers some more advanced web hosting services. We offer virtual domains, so you can have a domain (like example.caltech.edu) be hosted on UGCS.