You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
853 B
Lua

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

local _M = {}
function _M:get_ngx_conf_template()
return [[
# user www www;
pid tmp/{{LOR_ENV}}-nginx.pid;
# This number should be at maxium the number of CPU on the server
worker_processes 4;
events {
# Number of connections per worker
worker_connections 4096;
}
http {
sendfile on;
include ./mime.types;
{{LUA_PACKAGE_PATH}}
lua_code_cache on;
server {
# List port
listen {{PORT}};
# Access log
access_log logs/{{LOR_ENV}}-access.log;
# Error log
error_log logs/{{LOR_ENV}}-error.log;
# this variable is for view renderlua-resty-template)
set $template_root '';
location /static {
alias {{STATIC_FILE_DIRECTORY}}; #app/static;
}
# lor runtime
{{CONTENT_BY_LUA_FILE}}
}
}
]]
end
return _M