[Lua] "Hello, world!" from Lua file?
Jader H. Silva
jaderhs5 at gmail.com
Mon Jan 27 16:49:05 UTC 2014
Hello. You must use ngx.print
<http://wiki.nginx.org/HttpLuaModule#ngx.print>instead of print to output
into the response body.
2014-01-27 Shohreh <nginx-forum at nginx.us>
> Thanks for the tip.
>
> After editing nginx.conf thusly...
> ==============
> ...
> location / {
> root html;
> index index.html index.htm;
> content_by_lua_file html/hello.lua;
> add_header Content-Type text/plain;
> }
> ...
> ==============
>
> ... the script simply displays an empty page, with no error in
> logs/error.log.
>
> To avoid bothering you guys with newbie questions, is there a tutorial to
> get started with ngx_lua?
>
> Thank you.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,246864,246870#msg-246870
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
--
att.
Jader H. Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140127/315bf24b/attachment.html>
More information about the nginx
mailing list