|
|
 |
Enabling SSI
As mentioned in the Prepare the Page in the Embedding the News section of these Learning Pages, executing Server Side Includes (SSI) is required for utilizing the Perl script that generates dynamic news content on your site. The two ways of allowing SSI to function are described as follows:
Renaming .html to .shtml: The first option is to change the standard HTML extension.html to signify that it is a server-parsed HTML file, .shtml. Once you change the name (and update any links that need to be updated) the web server will recognize the page as a server-parsed HTML file and will execute any SSI code included in the page.
Making the .html file executable: If changing the name of the file is not an option, like in the case where many links or links not in your site need to be updated due to a name change, you can enable SSI by making the HTML file executable. In a Unix-based file system, a file that can be run as a program or contains scripted code typically needs to be executable. This method is the more difficult of the two options, but allows you to maintain the .html extension. To change this property of the HTML file, follow these steps:
- Open a terminal. Run a terminal program, like PuTTY, xterm, or the Mac OS X Terminal.
- SSH to the Academic Computing Server (ACS). Establish an Secure Shell (ssh) connection with
acs.bu.edu which in most Unix-style terminals is invoked by typing ssh acs.bu.edu . Supply the appropriate login information.
- Get authorization via Kerberos system. Type
klog -t to obtain your permissions on the server. Once you supply your Kerberos password, the server will allow you into the directories on www.bu.edu for which you are authorized as a contributor.
- Go to your page's directory. Change the directory to the one in which your HTML file resides.
Your school or college's webpage is found somewhere in /afs/.bu.edu/cwis/webuser/web/ . The general rule is that your top level directory following www.bu.edu/ is sorted by the first two letters and then the actual name. For example: http://www.bu.edu/webcentral/ is found in the directory /afs/.bu.edu/cwis/webuser/web/w/e/webcentral/ .
At the command-line in your terminal, type cd /afs/.bu.edu/cwis/webuser/web/X/Y/ZZZZZZ (substituting X for the first letter of the directory name, Y for the second letter, and ZZZZZZ for fill name of the directory).
From here, the structure of the directories mirror the way they are on the web. If you need to go into another directory within your site, use the cd command, followed by the name of the directory.
- Change the permission of your HTML file. Now that you are in the folder with your HTML file, you will have to bestow executable status (permission) to this file.
Type chmod a+x and the filename, i.e. chmod a+x index.html .
You have now given executable permissions to your HTML file. It now can process SSI elements properly.
|