2021-04-03 02:37:14 -04:00
|
|
|
# Main Nginx Configuration File
|
|
|
|
|
|
|
|
user www-data;
|
|
|
|
worker_processes auto;
|
|
|
|
pid /run/nginx.pid;
|
|
|
|
include /etc/nginx/modules-enabled/*.conf;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 768;
|
|
|
|
# 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;
|
|
|
|
more_set_headers 'Server: Library of Code Staff Command (https://www.libraryofcode.org)';
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
|
|
|
|
|
|
|
# server_names_hash_bucket_size 64;
|
|
|
|
# server_name_in_redirect off;
|
|
|
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
##
|
|
|
|
# SSL Settings
|
|
|
|
##
|
|
|
|
|
2021-05-01 15:28:21 -04:00
|
|
|
ssl_protocols TLSv1.2;
|
2021-05-01 15:13:49 -04:00
|
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
ssl_stapling on;
|
|
|
|
ssl_stapling_verify on;
|
|
|
|
ssl_session_cache shared:SSL:10m;
|
|
|
|
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
2021-05-01 15:29:40 -04:00
|
|
|
ssl_dhparam /etc/nginx/dhparam.pem;
|
2021-06-08 17:01:13 -04:00
|
|
|
ssl_ecdh_curve X25519:prime256v1:secp384r1;
|
2021-04-03 02:37:14 -04:00
|
|
|
|
|
|
|
##
|
|
|
|
# Logging Settings
|
|
|
|
##
|
|
|
|
|
|
|
|
#access_log /var/log/nginx/access.log;
|
|
|
|
#error_log /var/log/nginx/error.log;
|
|
|
|
|
|
|
|
|
|
|
|
log_format main_ext '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$host" sn="$server_name" ' 'rt=$request_time ' 'ua="$upstream_addr" us="$upstream_status" ' 'ut="$upstream_response_time" ul="$upstream_response_length" ' 'cs=$upstream_cache_status' ;
|
|
|
|
|
|
|
|
access_log /var/log/nginx/access.log main_ext;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
|
|
##
|
|
|
|
# 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;
|
|
|
|
|
2021-05-09 20:41:40 -04:00
|
|
|
##
|
|
|
|
# Passenger shit
|
|
|
|
##
|
|
|
|
|
|
|
|
passenger_max_pool_size 18;
|
|
|
|
|
2021-04-03 02:37:14 -04:00
|
|
|
##
|
|
|
|
# Virtual Host Configs
|
|
|
|
##
|
|
|
|
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
include /etc/nginx/sites-enabled/*;
|
2021-05-29 21:44:44 -04:00
|
|
|
include /etc/nginx/sites-custom/*;
|
2021-04-03 02:37:14 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#mail {
|
|
|
|
# # See sample authentication script at:
|
|
|
|
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
|
|
|
#
|
|
|
|
# # auth_http localhost/auth.php;
|
|
|
|
# # pop3_capabilities "TOP" "USER";
|
|
|
|
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
|
|
|
#
|
|
|
|
# server {
|
|
|
|
# listen localhost:110;
|
|
|
|
# protocol pop3;
|
|
|
|
# proxy on;
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# server {
|
|
|
|
# listen localhost:143;
|
|
|
|
# protocol imap;
|
|
|
|
# proxy on;
|
|
|
|
# }
|
|
|
|
#}
|