Configure mod_neko
Mod_neko
Mod_neko is an Apache module which embeds the Neko Virtual Machine that can runs haXe programs on the HTTP Server-side in order to generate dynamic web pages. For development purposes, it's better to use the Neko Dev Server which does not require any specific configuration.
Configuration
Mod_neko can be compiled for both Apache and Apache 2.2.x :
Since haXe 1.08, both versions are provided as part of the haXe or Neko distribution, they are named mod_neko.ndll for Apache 1.3 and mod_neko2.ndll for Apache 2.2.
Please note that if using Apache2 you should use an Apache2 prefork configuration or you may get into trouble when requesting a neko file.
Httpd.conf
You can then edit the Apache configuration and add the following lines :
LoadModule neko_module (your path to mod_neko.ndll): this will tell Apache to load the module when it startsAddModule mod_neko.c(only for Apache 1.3)AddHandler neko-handler .n: this will bind the.nfile extension to the handler declared inmod_neko.- Add
index.nto the list ofDirectoryIndexto enable a default index page
Each of these lines should be added in the httpd.conf file at the appropriate place.
LibNeko
Also, Neko needs to be accessible from Apache :
- on Windows, there should not be any problem since when running
haxesetup.exeeverything should be correctly configured - on OSX/Linux, you need to add your Neko install path the
%%/etc/ld.so.conf%%and then run theldconfigcommand. One other possibility is to modify yourLD_LIBRARY_PATHso Apache is able to loadlibneko.so(libneko.dylibon OSX).
Mod_neko on Apache in Linux
Mod_neko is currently compatible with Apache 2.2.x or Apache 1.3.
Most distributions don't have Apache 2.2 at their repositories.
They do have Apache 1.3.x. For Installing mod_neko in Ubuntu use this tutorial: Build nekovm on linux