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.
61 lines
942 B
Nginx Configuration File
61 lines
942 B
Nginx Configuration File
worker_processes ${{NUM_WORKERS}};
|
|
error_log stderr notice;
|
|
daemon off;
|
|
pid logs/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
|
|
client_max_body_size ${{BODY_SIZE}};
|
|
client_body_buffer_size ${{BODY_SIZE}};
|
|
|
|
lua_package_path "${{LUA_PATH}};;";
|
|
lua_package_cpath "${{LUA_CPATH}};;";
|
|
|
|
init_worker_by_lua_block {
|
|
local uuid = require "resty.jit-uuid"
|
|
uuid.seed()
|
|
}
|
|
|
|
init_by_lua_block {
|
|
require "lfs"
|
|
require "lpeg"
|
|
require "ltn12"
|
|
require "markdown"
|
|
require "mime"
|
|
require "socket"
|
|
}
|
|
|
|
resolver 127.0.0.11;
|
|
|
|
server {
|
|
listen ${{PORT}};
|
|
lua_code_cache ${{CODE_CACHE}};
|
|
|
|
location / {
|
|
default_type text/html;
|
|
content_by_lua 'require("lapis").serve("app")';
|
|
}
|
|
|
|
location /static/ {
|
|
alias static/;
|
|
}
|
|
|
|
location /files/ {
|
|
alias ../data/files/;
|
|
}
|
|
|
|
location /favicon.ico {
|
|
alias ../data/favicon.ico;
|
|
}
|
|
|
|
location /robots.txt {
|
|
alias ../data/robots.txt;
|
|
}
|
|
}
|
|
}
|