2023-12-16 17:47:04 +00:00
|
|
|
worker_processes auto;
|
|
|
|
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
|
2023-12-17 18:12:33 +00:00
|
|
|
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
|
2023-12-16 21:57:19 +00:00
|
|
|
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
|
|
|
|
|
2024-01-04 14:17:36 +00:00
|
|
|
{% if ansible_os_family != 'Archlinux'%}
|
|
|
|
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
|
|
|
|
{% endif %}
|
|
|
|
|
2023-12-16 17:47:04 +00:00
|
|
|
pcre_jit on;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
server_tokens off;
|
2023-12-16 21:57:19 +00:00
|
|
|
more_clear_headers "Server";
|
2023-12-16 17:47:04 +00:00
|
|
|
|
2023-12-20 22:29:42 +00:00
|
|
|
add_header Permissions-Policy "interest-cohort=()";
|
|
|
|
|
2023-12-16 17:47:04 +00:00
|
|
|
types_hash_max_size 2048;
|
|
|
|
types_hash_bucket_size 128;
|
|
|
|
|
2023-12-20 22:29:42 +00:00
|
|
|
include includes/proxy.conf;
|
|
|
|
|
2024-02-21 21:42:16 +00:00
|
|
|
# Helper variable for proxying websockets.
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
default upgrade;
|
|
|
|
'' close;
|
|
|
|
}
|
|
|
|
|
2023-12-16 17:47:04 +00:00
|
|
|
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;
|
|
|
|
tcp_nopush on;
|
2023-12-16 17:58:15 +00:00
|
|
|
|
|
|
|
# Gzip basically everything if we can
|
2023-12-16 17:47:04 +00:00
|
|
|
gzip on;
|
|
|
|
gzip_vary on;
|
2023-12-16 17:58:15 +00:00
|
|
|
gzip_types *;
|
|
|
|
gzip_proxied any;
|
|
|
|
gzip_comp_level 3;
|
|
|
|
gzip_min_length 1024;
|
2023-12-16 17:47:04 +00:00
|
|
|
|
2023-12-17 18:12:33 +00:00
|
|
|
brotli on;
|
|
|
|
brotli_types *;
|
|
|
|
brotli_comp_level 7;
|
|
|
|
brotli_min_length 1024;
|
|
|
|
|
2023-12-16 17:47:04 +00:00
|
|
|
keepalive_timeout 65;
|
|
|
|
|
|
|
|
include /etc/nginx/http.d/*.conf;
|
|
|
|
}
|
|
|
|
|
|
|
|
stream {
|
|
|
|
ssl_preread on;
|
|
|
|
|
|
|
|
include /etc/nginx/stream.d/*.conf;
|
|
|
|
}
|