Web Server

The Computer Science department runs a web server for www.cs.virginia.edu, and everyone who has a CS account gets space to host personal web pages. This web server is capable of executing php code.

Your site is hosted under the www.cs.virginia.edu domain name. The URL path to your web space is www.cs.virginia.edu/~username. In Unix/Linux, ~username is a special string that expands to the path to your home directory. The web server sees this path and translates it to the location where your web files are stored.

Where to put html/php files

The easiest way to access your storage is by logging in to one of our Linux servers. You can do this via ssh: Linux SSH Access

In your home directory, there is a folder called public_html/. If we put a file called site.php into public_html/, we can then browse to https://www.cs.virginia.edu/~username/site.php.

A simple test is to create a file index.html in your public_html directory and then browse to that directory. For example:

You may be tempted to create a symlink in your web space that points to a file in another user's home directory, or some other location. This will in fact work, however if the other user leaves the department or moves to a different storage partition, your site may break because the target file has moved.

  • web_server.txt
  • Last modified: 2021/03/23 13:45
  • by pgh5a