Repository navigation
CgiMode
Karrigell can be run with a built-in web server, but it can also be used with the Apache web server. When it receives a request for a Python script, Apache will launch the Python interpreter and run a CGI script that will execute the script and return the result to the browser
There are a couple of things you must know in order to get things running :
- the path of the Python interpreter on the file system of the server
- the document root (the absolute path of the directory where scripts stand)
- the URL path of the CGI directory on the server (usually /cgi-bin)
This information and other options must be declared in the configuration file cgi.ini, located in the directory cgi of the Karrigell distribution. Detailed explanations are given on the expected values.
Once you have filled it, run the script make_cgi_config.py : it will generate a package located in the subdirectory cgi-package, consisting in 2 directories :
- cgi-bin : its content must be copied or uploaded on the server's CGI directory
- root_directory : its content must be copied or uploaded on the document root
When this is done, you can start the Apache server ; it will serve requests exactly like with the built-in web server.