So, to start, you should edit the index.shtml file that is in your public_html directory by default.
It is a good idea to put a file called index.html (or .shtml) in each directory as the main page. That page will be the one loaded by default if no filename is specified. For example, http://www.engsoc.org/~username will call up ~username/public_html/index.html.
To upload files to your home directory you need to use SCP. WinSCP is an easy to use Windows program for SCP and there are links to download it from here. If you use the Cygwin package, it includes a command-line SCP client.
Using a WWW proxy will often improve the performance of your web browser, as frequently accessed web pages will be cached (i.e. stored on the proxy server) and can be sent to you without having to be fetched from the internet. Using a WWW proxy will also increase your security and privacy, as it prevents web servers from obtaining your real IP address or identity.
The instructions below describe how to configure your browser to use a web proxy, however neither Carleton nor EngSoc currently operate a proxy for you to use. For Netscape Navigator 2.0x/3.0x:
You can use http-proxy.carleton.ca:8080 as an FTP proxy as well.
On EngSoc, any file in your public_html directory with a .cgi extension will be executed by the web server when accessed. Even if it is a Perl script, it must be .cgi. You must also make it executable for yourself, since web scripts are run under the UID of the owner. "chmod 755 filename" will do this.
The following is an example CGI written in perl:
#!/usr/bin/perl print "Content-type: text/plain\n\n"; print "<b>Hello</b> World!\n" my $true = 1; if($true) print("true!\n"); else print("false!\n");
To run this script, save it in a file that ends in .cgi, like 'foo.cgi' and make sure that file is in your public_html directory. Then make the file executable:
chmod +x foo.cgi
Notice that the first thing that the script does is print what's called a MIME type for the page. All that does is tell your browser to display the rest of the output as plain text.
CGIs can be written in any programming language that will work on EngSoc's web server. Currently perl, python, tcl and shell scripts are known to work. Documentation for the Common Gateway Interface (CGI) is available on the web at http://hoohoo.ncsa.uiuc.edu/ and is beyond the scope of this FAQ.
In your .shtml file, insert a URL-path to the counter.pl CGI script as an SSI exec statement. It will look something like this:
<!--#exec cgi="../cgi/counter.pl" -->You may have to add in some more dots to that URL depending on where your page sits relative to http://www.engsoc.org/cgi. If the above doesn't work, try:
<!--#exec cgi="../../cgi/counter.pl" -->
If you create a file with a .shtml extension and add a line in it that looks like:
This page last modified: <!--#echo var="LAST_MODIFIED"-->You should see something like:
This page last modified: Monday, 26-Apr-2004 15:05:48 EDT
This is only a very simple example of what you can do with SSI. For more information see http://httpd.apache.org/docs/mod/mod_include.html
To display when a file was last modified, as in the SSI example above, using PHP, you would use the following code in your page:
<? print("This page last modified: "); print(date("l, j-M-Y H:i:s T",filemtime("7.php"))); ?>
The brackets and question marks are required and tell the webserver
where the PHP functions start and the plain HTML end. This doesn't even
scratch the surface of what you can do with PHP. For more information