109 lines
3.9 KiB
Plaintext
Executable File
109 lines
3.9 KiB
Plaintext
Executable File
load_module /usr/lib/angie/modules/ngx_http_headers_more_filter_module.so;
|
|
load_module /usr/lib/angie/modules/ngx_http_brotli_filter_module.so;
|
|
load_module /usr/lib/angie/modules/ngx_http_brotli_static_module.so;
|
|
load_module /usr/lib/angie/modules/ngx_http_zstd_filter_module.so;
|
|
load_module /usr/lib/angie/modules/ngx_http_zstd_static_module.so;
|
|
|
|
user www-data;
|
|
pid /run/angie.pid;
|
|
worker_processes auto;
|
|
worker_rlimit_nofile 65535;
|
|
|
|
events {
|
|
multi_accept on;
|
|
worker_connections 65535;
|
|
}
|
|
|
|
http {
|
|
|
|
log_format main '$remote_addr $remote_port - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for" "$http_cookie" "$sent_http_set_cookie" "$http_host" "$http3"';
|
|
|
|
|
|
#charset utf-8;
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
server_tokens off;
|
|
log_not_found off;
|
|
types_hash_max_size 2048;
|
|
client_max_body_size 512M;
|
|
client_body_buffer_size 512M;
|
|
etag off;
|
|
|
|
# MIME
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
# Logging
|
|
access_log /var/log/angie/access.log;
|
|
error_log /var/log/angie/error.log warn;
|
|
|
|
# SSL
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:SSL:10m;
|
|
ssl_session_tickets off;
|
|
|
|
# Mozilla Modern configuration
|
|
ssl_protocols TLSv1.3 TLSv1.2;
|
|
|
|
# OCSP Stapling
|
|
ssl_stapling on;
|
|
ssl_stapling_verify on;
|
|
resolver 127.0.0.1 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 valid=10s status_zone=default_resolver;
|
|
resolver_timeout 2s;
|
|
|
|
map $sent_http_content_type $compressible_type {
|
|
default 0;
|
|
~*text/plain 1;
|
|
~*text/css 1;
|
|
~*text/xml 1;
|
|
~*text/javascript 1;
|
|
~*application/javascript 1;
|
|
~*application/x-javascript 1;
|
|
~*application/json 1;
|
|
~*application/xml 1;
|
|
~*application/xml\+rss 1;
|
|
~*application/rss\+xml 1;
|
|
~*image/svg\+xml 1;
|
|
~*font/truetype 1;
|
|
~*font/opentype 1;
|
|
~*font/woff 1;
|
|
~*font/woff2 1;
|
|
~*application/font-woff 1;
|
|
~*application/font-woff2 1;
|
|
}
|
|
|
|
# Brotli compression
|
|
brotli on;
|
|
brotli_static on;
|
|
brotli_comp_level 6;
|
|
brotli_min_length 1000;
|
|
brotli_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss application/rss+xml image/svg+xml font/truetype font/opentype font/woff font/woff2 application/font-woff application/font-woff2;
|
|
|
|
# Zstd compression
|
|
zstd on;
|
|
zstd_comp_level 3;
|
|
zstd_min_length 256;
|
|
zstd_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss application/rss+xml image/svg+xml font/truetype font/opentype font/woff font/woff2 application/font-woff application/font-woff2;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_min_length 1000;
|
|
gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javasc
|
|
|
|
# Load configs
|
|
include /etc/angie/conf.d/*.conf;
|
|
include /etc/angie/sites-enabled/*;
|
|
more_clear_headers "Server";
|
|
|
|
set_real_ip_from 127.0.0.1;
|
|
real_ip_header X-Forwarded-For;
|
|
real_ip_recursive on;
|
|
|
|
}
|