I recently did setup openresty. However got a prob, I simply can't access lua file by writing in nginx.conf (idk if I have misunderstood anything):
content_by_lua_file /usr/local/openresty/nginx/html/test.lua
And trying also:
content_by_lua 'ngx.say("<p>hello</p>");
But when I visit it by a webbrowser I get a 403 forbidden error.
Any clues? I installed openresty like in the guide, in root. I've not changed anything.
My nginx.conf is pretty basic, looking like this with no errors in errorlog, only saying that it's forbidden: (I also tried setting user and group to root in .conf)
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location / {
default_type text/html;
content_by_lua 'ngx.say("<p>hello</p>");
}
}
}
Thanks in advance.