mirror of https://github.com/vouch/vouch-proxy
40 lines
961 B
Nginx Configuration File
40 lines
961 B
Nginx Configuration File
user nobody;
|
|
worker_processes 2;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid logs/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
lua_code_cache off;
|
|
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 65;
|
|
init_by_lua_block {
|
|
-- Function to find a key in a table
|
|
function tableHasKey(table,key)
|
|
return table[key] ~= nil
|
|
end
|
|
-- Function to turn a table with only values into a k=>v table
|
|
function Set (list)
|
|
local set = {}
|
|
for _, l in ipairs(list) do set[l] = true end
|
|
return set
|
|
end
|
|
}
|
|
|
|
include ../conf.d/*.conf;
|
|
} |