mod_wxjs is tested on Apache version 2.2.6. If you haven't installed Apache yet, I recommend you to use the latest XAMPP distribution. It contains everything you need to develop websites on an Apache server.
When you use a different version and you encounter problems, you can try to build mod_wxjs against the Apache libraries of your version.
Before you can use mod_wxjs you have to change the configuration file of Apache: httpd.conf
Path to DLL's
You have to load the wxjs module and associate the 'wxjs' handler with file extensions. These files will be processed by mod_wxjs. Other things which you can configure:
- wxJS_Modules: the path to modules.js file
- wxJS_RtSize: the size of the runtime (M --> Megabyte, K --> Kilobyte)
- wxJS_CtxSize: the size of the context (M --> Megabyte, K --> Kilobyte)
- wxJS_PreScript: the script to execute before running the main script (use a full path).
- wxJS_PostScript: the script to execute after running the main script (use a full path).
- wxJS_Encoding: the encoding of the scripts (default is UTF-8)
The following configurations are derived from libapreq2:
- wxJS_APREQ2_TempDir: Default location of temporary directory
- wxJS_APREQ2_ReadLimit: Maximum amount of data that will be fed into a parser. Default is 64 (MB).
- wxJS_APREQ2_BrigadeLimit: Maximum in-memory bytes a brigade may use. Default is 256 (K).
Keep in mind that each virtual host gets its own runtime.
LoadModule wxjs_module "c:/wxjs/bin/mod_wxjs.dll" AddHandler wxjs .wxjs wxJS_Modules "c:/wxjs/modules.js" wxJS_RtSize 1M wxJS_CtxSize 8K
response.print("<html><head><title>wxJS test program</title></head><body>"); response.print("<b>Hello world</b>"); response.print("</body></html>");
Read this tutorial for using mod_wxjs with the template engine and sqlite.