3

Apache has mod_lua. Is there a way to have it process an html page with a like tag similar to php?

If not is there some other method? (I've seen mod_plua but it doesn't seem to have much work towards it).

3 Answers 3

1

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

It was reported to be working in the lua-users mailing list.

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

P.S.

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

Sign up to request clarification or add additional context in comments.

Comments

1

For php-style Lua programming, you could definitely use mod_pLua. Contrary to what your initial statement says, it does have a lot of work put into it, just look at the extra features supported by it. Whether or not mod_lua will support this kind of programming in the future...who knows :)

Comments

-1

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

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

That should set the handler for html files to mod_lua (not tested as I don't use this mod).

1 Comment

Nope, this doesn't work. I already had lua files working fine. That or it's not <?lua.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.