101 lines
1.6 KiB
Nginx Configuration File
101 lines
1.6 KiB
Nginx Configuration File
user www-data;
|
|
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 768;
|
|
# multi_accept on;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
proxy_connect_timeout 600;
|
|
proxy_send_timeout 600;
|
|
proxy_read_timeout 600;
|
|
fastcgi_send_timeout 600;
|
|
fastcgi_read_timeout 600;
|
|
client_header_timeout 600;
|
|
client_body_timeout 600;
|
|
client_max_body_size 512M;
|
|
|
|
##
|
|
# Basic Settings
|
|
##
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 650;
|
|
types_hash_max_size 2048;
|
|
server_tokens off;
|
|
|
|
# server_names_hash_bucket_size 128;
|
|
# server_name_in_redirect off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
##
|
|
# SSL Settings
|
|
##
|
|
#ALSO MUST CHANGE THE OPTIONS IN /etc/letsencrypt
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
#ssl_prefer_server_ciphers on;
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
#add_header Set-Cookie "Path=/; HttpOnly; Secure";
|
|
|
|
##
|
|
# Buffer Policy
|
|
##
|
|
client_body_buffer_size 1K;
|
|
client_header_buffer_size 1k;
|
|
large_client_header_buffers 2 1k;
|
|
|
|
##
|
|
# Gzip Settings
|
|
##
|
|
|
|
gzip on;
|
|
|
|
# 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;
|
|
|
|
##
|
|
# Virtual Host Configs
|
|
##
|
|
|
|
upstream pi3 {
|
|
server 192.168.1.13;
|
|
}
|
|
|
|
upstream pi2 {
|
|
server 192.168.1.12:8107;
|
|
|
|
}
|
|
|
|
upstream pi1 {
|
|
server 192.168.1.11:3000;
|
|
}
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
}
|
|
|