|
|||||||
1. Introduction
2. Installing Karrigell 3. The Web server 3.1 The Root Directory 3.2 Serving static files 3.3 Command line options 4. Configuration options 5. Working with Apache, LightTPD or Xitami 6. Programming 7. Debugging 8. Python scripts 9. Karrigell Services 10. Python Inside HTML 11. HTML Inside Python 12. HTMLTags - generate HTML in Python 13. Including documents 14. Sessions 15. Authentication 16. Translation and Unicode |
3. The Web serverThe default built-in web server is asynchronous, like in the modules
3.1 The Root DirectoryThe Root Directory is the place where you place the files that will be reached on top of the url hierarchy ; if you placemyfile.htm in this directory, it will be called by
http://myhost/myfile.htm where myhost is your host name (try
localhost)
On installation, the Root Directory is set to the subdirectory 3.2 Serving static filesTo serve "static" files (HTML files, GIF or JPEG Images, etc) all you have to do is to create them using you favorite tool and save them to the Root Directory Suppose you create an HTML document called If you save the file in a subdirectory, you must prepend its name : for file
myImage.gif in subdirectory To reach files out of the Root Directory, use aliases (see 3.4) If no file name is specified and the url matches a directory, the server looks for a file with the name index.html, index.htm, index.py, index.pih, index.hip or index.ks. If it doesn't find one, it prints a list of the subfolders and files in the directory; if it finds more than one, it raises an exception If the extension of a file is not specified, the server will look for a file with one of
the extensions
3.3 Command line optionsThe command line is :
where
|