1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/tickbh-luojiawaf_lua

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
nginx.conf 3.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
tickbh Отправлено 31.03.2022 09:34 4ab9015
# Generated by tool.fit
# https://tool.fit/nginx welcome to use
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
user root root; #因为ipset启用需求权限, 若不需要防火墙禁用, 则可不添加
worker_processes auto;
worker_rlimit_nofile 65535;
events {
worker_connections 10240;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 100m;
lua_shared_dict limit 50m;
lua_shared_dict cache_dict 50M;
lua_shared_dict ip_dict 50M;
lua_max_running_timers 2048;
lua_max_pending_timers 2048;
error_log /luojia/logs/error.log ;
access_log /luojia/logs/access.log main;
resolver 127.0.0.11;
lua_package_path "/luojia/luojia/?.lua;/luojia/openresty/module/lua-resty-redis/lib/?.lua;;";
init_worker_by_lua_file "/luojia/luojia/init.lua";
access_by_lua_file "/luojia/luojia/access.lua";
header_filter_by_lua_file "/luojia/luojia/header_filter.lua";
upstream localhost {
server 0.0.0.1;
balancer_by_lua_file "/luojia/luojia/balancer.lua";
keepalive 1024; # connection pool
}
server {
listen 80 default;
server_name localhost;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost;
proxy_set_header Host $host:$server_port; #$server_port
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Nginx-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # 升级协议头
proxy_set_header Connection upgrade;
log_by_lua_file "/luojia/luojia/upstream_log.lua";
}
}
server {
listen 443 ssl;
server_name localhost;
root html;
index index.html index.htm;
ssl_certificate_by_lua_file "/luojia/luojia/ssl.lua";
ssl_certificate /luojia/public/luojiawaf.com.pem;
ssl_certificate_key /luojia/public/luojiawaf.com.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost;
proxy_set_header Host $host:$server_port; #$server_port
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Nginx-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # 升级协议头
proxy_set_header Connection upgrade;
log_by_lua_file "/luojia/luojia/upstream_log.lua";
}
}
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/tickbh-luojiawaf_lua.git
git@api.gitlife.ru:oschina-mirror/tickbh-luojiawaf_lua.git
oschina-mirror
tickbh-luojiawaf_lua
tickbh-luojiawaf_lua
master