
Note when applying this update you will have to update existing nginx vhosts to match new listening addresses (IPv6). Preferably you should update them to unix socket though and apply the changes to the tor hidden service config as well
94 lines
1.8 KiB
Nginx Configuration File
94 lines
1.8 KiB
Nginx Configuration File
user www-data;
|
|
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
include /etc/nginx/modules-enabled/*.conf;
|
|
pcre_jit on;
|
|
worker_rlimit_nofile 30000;
|
|
|
|
events {
|
|
worker_connections 20000;
|
|
multi_accept on;
|
|
}
|
|
|
|
http {
|
|
|
|
##
|
|
# Basic Settings
|
|
##
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
server_tokens off;
|
|
client_max_body_size 10G;
|
|
proxy_http_version 1.1;
|
|
proxy_buffering off;
|
|
|
|
client_body_timeout 10s;
|
|
client_header_timeout 10s;
|
|
|
|
server_names_hash_bucket_size 32768;
|
|
server_names_hash_max_size 1024;
|
|
server_name_in_redirect off;
|
|
port_in_redirect off;
|
|
charset UTF-8;
|
|
index index.html index.htm index.php index.hosting.html;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
map $sent_http_content_type $expires {
|
|
default off;
|
|
~image/ 10d;
|
|
~video/ 10d;
|
|
~audio/ 10d;
|
|
text/css 10d;
|
|
application/javascript 10d;
|
|
}
|
|
expires $expires;
|
|
|
|
map $http_x_forwarded_proto $php_scheme {
|
|
default $scheme;
|
|
http "http";
|
|
https "https";
|
|
}
|
|
map $http_x_forwarded_proto $php_https {
|
|
default "";
|
|
https "on";
|
|
}
|
|
map $http_x_forwarded_proto $php_port {
|
|
default 80;
|
|
https 443;
|
|
}
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
log_format custom '$host: 0.0.0.0 - $remote_user [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent"';
|
|
access_log /var/log/nginx/access.log custom;
|
|
error_log /var/log/nginx/error.log notice;
|
|
log_not_found off;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
# gzip_buffers 16 8k;
|
|
# gzip_http_version 1.1;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
|
|
|
##
|
|
# Virtual Host Configs
|
|
##
|
|
|
|
include /etc/nginx/sites-enabled/*;
|
|
}
|