|
|||||||
|
Installing and Debugging Your Own CGIsYour Virtual Private Server is unique because it provides you with all of the flexibility, power, and control of a dedicated server. Because of this, you are free to customize and configure your Virtual Private Server for your specific circumstance and needs. This includes the ability to install your own custom developed CGI scripts or those that you have downloaded from a third party source. This document is divided into several sections. Each section includes a discussion about a specific topic. Each topic, though important, may or may not have applicability to your specific situation. The Virtual EnvironmentYour Virtual Private Server services operate in an environment completely separate of the root system (and any other Virtual Private Server hosted on the same host machine). This means that your script does not have access to any files residing on the root file system, only those files that are located in your home directory hierarchy. Path SpecificationBecause your CGI scripts operate in a Virtual Environment, the pathnames that you specify in your CGI scripts should be declared with respect to your home directory. For example, your script may access a file to read from or write to. Instead of specifying a pathname that begins with /usr/home/LOGIN-NAME/usr/local/..., you would simply use /usr/local/... instead. Setting PermissionsAfter you have uploaded your script or have created it on-line, make sure you give the script permission to execute. In a UNIX environment, each file has a specific mode or set of permissions which determine who can read or write to the file as well as who can execute the file (if anyone). Setting the execute bit on a file is easy to do. You can either use iManager or you can Telnet or SSH to your Virtual Private Server and type this command: % chmod +x FILENAME FILENAME is the name of your script. If a script does not have execute permissions, your web server will report a 403 Forbidden server error when it attempts to execute the script. Common Problems with Perl Scripts
Troubleshooting 500 Server ErrorsIf you encounter a 500 Server Error when you execute your scripts, the best way to diagnose the actual source of the problem is to examine your web server's error log. Your error log is typically stored in your ~/www/logs directory under the name error_log. To review the server error generated in real time, perform the following steps, after connecting to your Virtual Private Server via Telnet or SSH:
Common CGI Errors and Solutions
|
||||||
|
Send mail to: mailto:webmaster@littletechshoppe.com with questions or comments about this web site. Copyright © 1996-2004. A Little Technology Shoppe, LLC (alts.net®). All rights reserved. Netscape and the Netscape Logo are registered trademarks of Netscape Communications Corp. Microsoft is a registered trademark and the Microsoft Internet Explorer Logo is a trademark of Microsoft. All trademarks are owned by the respective company or A Little Technology Shoppe, LLC. | |||||||