Lua is embedded in html with apache

Apache has mod_lua

. Is there a way to get it to render an html page with a php-like tag like this?

If there is no other method? (I saw mod_plua

, but it doesn't seem to have much work to do).

+3


source to share


3 answers


I haven't actually tried it, but Haserl is what you might need.

He has been reported to work on the lua-users mailing list.

Haserl is a small cgi wrapper that allows PHP-style cgi programming, but uses the UNIX bash or Lua shell as the programming language. It is very small, so it can be used in embedded environments or something like PHP is too big.



PS

I haven't worked with this, so I'm not sure if it works.

+1


source


For php style Lua programming, you can definitely use mod_pLua. Contrary to what your original operator says, there is a lot of work in it, just look at the additional features it supports. Will mod_lua support this kind of programming in the future ... who knows :)



+1


source


You need to update your configuration. In your Apache config add the following lines of code:

AddHandler lua-script .lua
AddHandler lua-script .htm .html

      

This should set a handler for html files in mod_lua (untested as I am not using this mod).

-1


source







All Articles