Personal Web Pages
Getting Started
The first step in creating a personal SOE web page is to sign up for an SOE UNIX account. To do so, you will need to download and fill out the SOE Account Registration Form.
Once you have an account, you will need to log in to create your site. In order to set the proper file permissions, you will need to log in to a Linux machine on the SOE network. Unfortunately, the Windows file manager does not have a feature to allow you to set permissions on your home directory. If you are not familiar with how to log in to a Linux machine, please contact the support desk.
Once you are logged in to your Linux account, use the following commands to prepare your web page:
chmod 711 ~
mkdir ~/.html
chmod 755 ~/.html
touch ~/.html/index.html
chmod 644 ~/.html/index.html
These commands:
- Permit the web server to access your home directory
- Create a .html directory where you will put your web content
- Permit the web server to access your .html directory
- Create an empty home page (index.html)
- Permit the web server to access index.html
Viewing Your Web Pages
Once you have your .html folder created and the permissions properly set, you can access your personal web page at the following URL:
http://www.soe.ucsc.edu/~<Your User Name>/
Note that initially, you will get a blank page. As long as you don't see an error message, you've done these steps correctly.
Updating Your Web Pages
Once your site has been created, there are several ways that you can update content, depending on which type of computer you are using.
Windows Users
To access your personal web page from a Windows machine, you will need to be logged in to a machine that it located on the SOE network. Once you are logged in to an SOE machine, you can browse to the following URL:
\\fs3\<Your User Name>\.html
You can now edit your index.html file. You can also put other files and even create subdirectories. Everything you put in this directory or any of it's subdirectories becomes visible on the web.
For every file that you put in your web page through the Windows interface, you may need to set the permissions properly to allow the web server access to your files. To do this, right-click on a file and folder (or you can select many or all of your files and folders at the same time) and select Properties, and then go to the Security tab. There should be three names listed: Everyone, your security group (probably users, staff or faculty), and your login name. Click on Everyone and then check the Read & Execute and Read options. Then click your user group and check the Read & Execute and Read options. If you click on your user name, you should note that you have all permissions checked. You should probably not change this.
If you're getting 403 Access Denied errors when you view your web page in a web browser, then you probably haven't set your file permissions correctly.
You can edit your files directly in a program like Dreamweaver or Contribute by clicking File, Open and then browsing to the FS3 share listed above.
Linux Users
Linux users can access their web directory when logged into any SOE Linux machine. To access your web directory, use the following command:
cd ~/.html
Anything you put in this folder will be published on the web. Remember that in order for your files to be published, they must be world-readable. You can achieve this by using the following command:
chmod 644 <Your File Name>
Similarly, any subdirectories that you have in your web page need to be world-readable as well. You can accomplish this by using the following command:
chmod 755 <Directory Name>
If you're getting 403 Access Denied errors when you view your web page in a web browser, then you probably haven't set your file permissions correctly.
You may use whatever program you like to edit your web content.
FTP
You can also access your web space through FTP. To do so, connect your FTP program to ftp.cse.ucsc.edu using your SOE login and password. Once connected, you can place your web file into your .html folder as described above. Normally, you do not need to worry about modifying file permissions through FTP; the FTP server takes care of that for you.
WebDAV
While our web servers do support WebDAV, this feature has not been implemented on our user home pages yet. When this functionality becomes available, we will post information about how to use it here.
PHP and CGI Scripts
Our web servers support PHP and CGI programs for personal web pages. Please note that the SOE does NOT generally offer script debugging services for personal web space. If you decide to use PHP or CGI on your personal web page, you need to make sure that you have the proper expertise to do so. The PHP Web Site is an excellent place to get started. We strongly recommend PHP over CGI for everyone.
Running CGI programs or PHP scripts from your home directory can lead to your personal or SOE web files being compromised. Programs run from your "~/.html/cgi-bin" directory run with your permissions and ownership. These programs could potentially expose any files or information in your home directory to the outside world.
Before writing and running CGI-based programs, please make yourself familiar with the risks involved, and take the necessary precautions to protect yourself and SOE's properties. The "Open Web Application Security Project" is a good source of information on web application security. Their "Ten Most Critical Web Application Security Vulnerabilities" paper is a good place to start.
PHP
To use PHP, simply create PHP scripts directly in your .html folder (or any subfolder). If you would like to see what PHP modules are installed, simply create a PHP script that calls the phpinfo(); function. As an example, create an hello.php file in your ~/.html/ folder and place the following code in it:
<?php
Header("Content-Type: text/plain");
echo "Hello!\n";
?>
Then, point your web browser to a URL like this one:
http://www.soe.ucsc.edu/~<Your User Name>/hello.php
You should see the word Hello! printed back to you.
CGI
Using CGI is significantly more complicated and requires more knowledge than this document can provide. However, there is some important information and tips that we can give you to help you get started. We STRONGLY recommend that you become familiar with logging in to an SOE Linux machine before attempting to create any CGI scripts.
Before you can use any CGI scripts, you need to create a special folder where all your CGI scripts will go. To do so, use the following commands from any SOE Linux machine:
mkdir ~/.html/cgi-bin
chmod 755 ~/.html/cgi-bin
Once you have your cgi-bin folder created, you can place scripts into it. As an example, we'll use a hello.pl script. To create the script, use your favorite Linux text editor to create a file called hello.pl in your ~/.html/cgi-bin/ folder. Place the following text into this file:
#!/usr/bin/perl
print "Content-Type: text/plain\n";
print "\n";
print "Hello!\n";
Once you have created the file, use the following command to make it executable:
chmod 755 ~/.html/cgi-bin/hello.pl
Then, open your web browser and point it to a URL like this one:
http://www.soe.ucsc.edu/~<Your User Name>/cgi-bin/hello.pl
You should see the word Hello! printed back to you.
If you have problems with your CGI scripts, there is a special debugging URL that you can use to see the errors that your CGI script is producing. The format of the URL is:
http://www.soe.ucsc.edu/cgi-bin/cgiwrapd/<Your User Name>/hello.pl
Note that you put just your user name and the script name in this URL. You do not need to include the tilda (~) or the cgi-bin folder name. When you use this URL to access your script, instead of getting just the output of the script on the screen, you will get a full debug screen that will tell you exactly what went wrong with your script.
Unfortunately, that's all the support we can provide for CGI scripts. There is no additional debugging information or log files that we can give you.
Logging Access to your Personal Web Pages
If you would like access to a web server log file of the requests to your personal web pages, create an empty folder in your home directory called .html-log, like this:
mkdir ~/.html-log
The system will start creating log files that are owned by you in that folder. You can then process these log files with whatever log analysis tool you like.
Please be aware that these files will use up your available disk space. If you get a lot of web traffic, you'll want to make sure that you rotate out your old log files frequently so that you don't use up all your disk quota.



