65 lines
1.7 KiB
Nginx Configuration File
65 lines
1.7 KiB
Nginx Configuration File
|
|
user nginx;
|
|
worker_processes 1;
|
|
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
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;
|
|
|
|
keepalive_timeout 65;
|
|
|
|
# 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/x-javascript
|
|
# text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
# ver https://mozilla.github.io/server-side-tls/ssl-config-generator/
|
|
ssl_certificate ssl/cert.pem;
|
|
ssl_certificate_key ssl/cert.key;
|
|
ssl_dhparam ssl/dhparams.pem;
|
|
|
|
ssl_session_timeout 1d;
|
|
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
|
ssl_session_tickets off;
|
|
|
|
# modern configuration
|
|
ssl_protocols TLSv1.3;
|
|
ssl_prefer_server_ciphers off;
|
|
|
|
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
|
|
# add_header Strict-Transport-Security "max-age=63072000" always;
|
|
|
|
# OCSP stapling
|
|
# ssl_stapling on;
|
|
# ssl_stapling_verify on;
|
|
|
|
# verify chain of trust of OCSP response using Root CA and Intermediate certs
|
|
# ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates;
|
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
}
|