User manual
Table Of Contents
- Web Technologies Administration
- Contents
- Web Technologies Overview
- Managing Web Technologies
- Managing Websites
- Using Server Admin to Manage Websites
- Changing the Access Port for a Website
- Improving Performance of Static Websites (PerformanceCache)
- Enabling Access and Error Logs for a Website
- Setting Up Directory Listing for a Website
- Connecting to Your Website
- Enabling WebDAV on Websites
- Enabling a Common Gateway Interface (CGI) Script
- Enabling Server Side Includes (SSI)
- Viewing Website Settings
- Setting Server Responses to MIME Types and ContentHandlers
- Enabling SSL
- Enabling PHP
- User Content on Websites
- WebMail
- Secure Sockets Layer (SSL)
- Working With Open-Source Applications
- Installing and Viewing WebModules
- Solving Problems
- Where to Find More Information
- Glossary
- Index

Chapter 3 Managing Websites 33
Enabling a Common Gateway Interface (CGI) Script
Common Gateway Interface (CGI) scripts (or programs) send information back and
forth between your website and applications that provide different services for the site.
• If a CGI is to be used by only one site, install the CGI in the Documents folder for the
site. The CGI name must end with the suffix “.cgi.”
• If a CGI is to be used by all sites on the server, install it in the /Library/WebServer/CGI-
Executables folder. In this case, clients must include /cgi-bin/ in the URL for the site.
For example, http://www.example.com/cgi-bin/test-cgi.
• Make sure the file permissions on the CGI allow it to be executed by the user named
“www.” Since the CGI typically isn’t owned by www, the file should be executable by
everyone.
To enable a CGI for a website:
1 In Server Admin, click Web in the list for the server you want.
2 Click Settings in the button bar.
3 In the Sites pane, double-click the site in the list.
4 In the Options pane, select CGI Execution.
5 Click Save.
Web service restarts.
Enabling Server Side Includes (SSI)
Enabling Server Side Includes (SSI) allows a chunk of HTML code or other information
to be shared by different webpages on your site. SSIs can also function like CGIs and
execute commands or scripts on the server.
Note: Enabling SSI requires making changes to UNIX configuration files in the Terminal
application. To enable SSI, you must be comfortable with typing UNIX commands and
using a UNIX text editor.
To enable SSI:
1 In the Terminal application, use the sudo command with a text editor to edit as the
super user (root):
2 Add the following line to each virtual host for which you want SSI enabled:
Options Includes
Each site is in a separate file in /etc/httpd/sites/.
To enable SSI for all virtual hosts, add the line outside any virtual host block.
3 In Server Admin for the server you want, click Settings in the button bar.
4 In the Sites pane, double-click one of the virtual host sites.
LL2350.book Page 33 Friday, August 22, 2003 2:32 PM