mirror of
https://github.com/Safe3/openresty-manager.git
synced 2025-10-04 13:51:53 +08:00
90 lines
2.2 KiB
Nginx Configuration File
90 lines
2.2 KiB
Nginx Configuration File
user root;
|
|
worker_processes auto;
|
|
worker_cpu_affinity auto;
|
|
worker_rlimit_nofile 102400;
|
|
|
|
events {
|
|
use epoll;
|
|
accept_mutex off;
|
|
worker_connections 102400;
|
|
}
|
|
|
|
pcre_jit on;
|
|
worker_shutdown_timeout 240s;
|
|
|
|
|
|
http {
|
|
include resolver.conf;
|
|
|
|
lua_package_path "/opt/om/nginx/lua/?.lua;/opt/om/nginx/lua/vendor/?.lua;;";
|
|
lua_http10_buffering off;
|
|
lua_socket_log_errors off;
|
|
lua_regex_match_limit 100000;
|
|
lua_regex_cache_max_entries 8192;
|
|
lua_shared_dict kvdb 16m;
|
|
|
|
init_by_lua_file /opt/om/nginx/lua/ngx_conf_init.lua;
|
|
init_worker_by_lua_file /opt/om/nginx/lua/ngx_conf_init_worker.lua;
|
|
log_by_lua_file /opt/om/nginx/lua/ngx_conf_log.lua;
|
|
|
|
server_names_hash_bucket_size 2048;
|
|
|
|
uninitialized_variable_warn off;
|
|
|
|
|
|
log_format proxy '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" upstream: $upstream_addr request_time=$request_time upstream_time=$upstream_response_time';
|
|
access_log off;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65s;
|
|
|
|
client_header_buffer_size 16k;
|
|
large_client_header_buffers 4 32k;
|
|
client_max_body_size 0;
|
|
|
|
server_tokens off;
|
|
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
underscores_in_headers on;
|
|
ignore_invalid_headers off;
|
|
|
|
include real_ip.conf;
|
|
include gzip.conf;
|
|
|
|
proxy_http_version 1.1;
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' '';
|
|
}
|
|
|
|
proxy_buffer_size 16k;
|
|
proxy_buffers 8 16k;
|
|
proxy_busy_buffers_size 32k;
|
|
proxy_ignore_client_abort on;
|
|
proxy_cache_path /tmp/ngx_disk_cache levels=1:2 keys_zone=cache_zone:32m max_size=8g inactive=60m use_temp_path=off;
|
|
|
|
include ssl.conf;
|
|
include upstreams/*.conf;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
|
|
server_name _;
|
|
|
|
location / {
|
|
root html;
|
|
}
|
|
|
|
location /om_stats {
|
|
allow 127.0.0.0/8;
|
|
deny all;
|
|
content_by_lua_file /opt/om/nginx/lua/ngx_conf_stats.lua;
|
|
}
|
|
}
|
|
|
|
include sites/*.conf;
|
|
|
|
}
|