User manual

Directory structure
Cobalt Qube 3 User Manual 225
User home page
When Qube 3 Administrator creates a user through the Server Desktop, the home
directory for that user is created in:
/home/users/username/
User must upload files for their Web pages to:
/home/users/username/web/
Users can view their Web pages at:
http://<IP address>/users/<username>/ or http://<IP address>/~ <username>/
CGI scripts
The Qube 3 supports common gateway interface (CGI) scripts, such as those
written in Perl or C, as well as Unix shell scripts.
CGI scripts allow you to develop highly interactive, powerful Web-based
applications by building server-side CGI scripts that generate Web pages in
response to specific user inputs. These applications range from simple scheduling
and conferencing applications to sophisticated electronic commerce solutions.
You can develop CGI scripts on your desktop machine and then transfer them to
the Qube 3 through an FTP-based application that allows permission bits to be
set to “Executable”.
CGI scripts must use .pl or .cgi filename extensions in order to beexecuted by the
Web server.
Use FTP to upload .cgi and .pl files; use ASCII mode to upload CGI files. Once
the file is on the Qube 3, use your FTP program to make the script executable.
You can also use the telnet command:
chmod 775 <filename>.cgi
The path to Perl is
/usr/bin/perl/
To set the access rights specifying who is allowed to run CGI scripts, see “Web
settings” on page 141.
PHP
The Qube 3 is pre-configured with support for embedded PHP scripts. You can
save PHP files in any directory on your site, provided that the file ends with
a .php extension.