Hello
Now that I have a working Nginx with the ngx_lua module, I'd like to start learning how to write web scripts.
The following page doesn't have a basic sample:
http://wiki.nginx.org/HttpLuaModule
So I used the following...
http://yichunzhang.wordpress.com/2010/05/18/a-simple-ngx_lua-example-for-the-future/
... to edit nginx.conf and write a basic hello.lua file:
================ nginx.conf
...
server {
listen 12345;
server_name localhost;
location / {
root html;
index index.html index.htm;
content_by_lua_file hello.lua;
}
...
================ html/hello.lua
print("Hello, world!")
================
But when I call http://192.168.0.10:12345/hello.lua, Chrome downloads the file instead of displaying the output.
What should I do?
Thank you.