T
T
Toopie2018-05-27 13:50:00
Nginx
Toopie, 2018-05-27 13:50:00

How to write a simple Lua script on Nginx?

Hello. Delivered on the LUA server.
I create an index.lua file with the text print("Hello");
Then I go to my website: example.com/index.lua
And they offer me to download the file, but I would like the text "Hello" to turn out, how can I do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
goadv, 2018-05-27
@goadv

In nginx config settings:
More details here

A
Andrey Tsvetkov, 2018-05-27
@yellow79

Something you have configured incorrectly in nginx.
Also, print("Hello") will print "Hello" to the console, not the result of the query. I recommend reading, it should be clear https://ruhighload.com/%D0%98%D1%81%D0%BF%D0%BE%D0...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question