Webpage
From Helpme
Webpages for SCU Engineering students are available through the Design Center. This document describes how to set up and use webpages; see webpage-policy for policies governing the content of student webpages.
Contents |
Webpage Creation/Removal
The command "webpage" will allow you to request that your webpage be created. This command is available from the Unix command line. You may also use this utility to request that your webpages be removed from the system. Just follow the on-screen prompts to make the appropriate request.
Please note that the webpage utility submits requests to an automated system. Requests are processed every 5 minutes. It should take no longer than 15 minutes for a request to be fully processed.
Webpage Location
URL
Your webpage will be available at the following URLS:
- Linux Webserver - http://linux.students.engr.scu.edu/~username/
- Solaris Webserver - http://sol.students.engr.scu.edu/~username/
Both servers are configured with the same version of Apache. In general, the only difference is the underlying OS.
Filesystem
You can access the files that make up your webpage directly from any DC workstation.
- UNIX (Linux/Solaris):
/webpages/username
- Windows:
\\samba1\webpages\username
Changes made to the files in these locations will be immediately reflected on your webpage.
NOTE: The web server will not be able to access your webpages unless they are world-readable.
FTP/SFTP
Changing your web content may also be done remotely using ftp or sftp.
- FTP Server:
ftp.engr.scu.edu - FTP Path:
/webpages/username - FTP Password: (Your Unix account password)
The same basic parameters can be used to access the system securely via sftp. This allows you to use a program like WinSCP, for example, to securely upload and manage your web content remotely.
File Naming
Regular HTML files should have an extension of .html or .htm.
If a URL references a directory instead of a file, the server will look for a file named index.html and use that. If index.html does not exist, the server will also search for other index files in this order: index.htm index.cgi index.pl index.shtml index.php (see below if you do not know what some of these extensions are). If no index is found, the server will generate a listing of files in the directory.
Dynamic Content Support
The Engineering Student Webservers support several methods of producing dynamic content.
PHP
Files created with the extension .php will be processed as PHP scripts by the webservers. The servers currently support PHP4. PHP supports access to MySQL.
Further details on programming with PHP can be found here.
CGI Scripts
Any file with an extension of .cgi or .pl will be treated as a CGI program regardless of what directory it is in. No other directories or extensions will be recognized as CGI programs. CGI programs will be run as your username.
You can write your CGI programs for Solaris or Linux. Please note that programs compiled under one operating system will not work under any others, although perl or shell script CGIs may work on multiple machines.
NOTE: For CGI scripts to be run, execute permission must be set on the script file.
Server-Side Includes
If you wish to use Server-side includes (SSI), also known as server-parsed HTML, simply name your file with a .shtml extension.
Access Control
You can restrict access to your pages by placing directives in a file called .htaccess in your web directory. (Note the leading dot in the name)
For further information, see the Apache documentation for restricting access by hostname/address or by username/password.
The htpasswd program is located in /opt/apache/bin/
Troubleshooting
General
If you run into errors with your code, the first place you should check is the server logs. They can be found in the directory:
/opt/apache/shared/logs/ The Linux server logs are linux.students.* while the Solaris logs are sol.students.*.
An effective command for debugging is to run the following command in a terminal (or ssh session), then in your browser reload the page you're having trouble with. (This assumes you're using the Linux webserver)
gtail -f -n0 /opt/apache/shared/logs/linux.students.* | grep username
replacing username with your actual DC username. This should show you all access attempts and errors to any of your web pages.
My Webpage Disappeared!
If your webpage was working previously, but now the server claims it no longer exists, it's likely you've removed the required legal disclaimer on your main index page. See the webpage-policy page for more details. Once you restore the disclaimer, you can rerun the webpage command to request that your webpage be re-enabled. Once you do, your page will be restored within 15 minutes.
Other Issues
Any other requests or issues regarding webpages should be emailed to webmaster@engr.scu.edu.
