server {
listen 443 ssl;
server_name sw0.p.cc;
ssl_certificate /cert/proxy-full.crt;
ssl_certificate_key /cert/proxy.key;
location / {
proxy_pass http://10.1.11.1;
}
}
### BEGIN config
user www-data;
worker_processes auto;
pid /run/nginx.pid;
pcre_jit on;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
multi_accept off;
accept_mutex off;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 120s;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Proxy Settings
##
client_max_body_size 0;
client_body_buffer_size 512;
client_body_timeout 120s;
proxy_connect_timeout 600s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
send_timeout 600s;
proxy_http_version 1.1;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_certificate /etc/letsencrypt/live/********/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/********/privkey.pem;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 2;
gzip_min_length 1024;
gzip_http_version 1.0;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
##
# Include sites configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
### END config