You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
1.7 KiB
Nginx Configuration File
97 lines
1.7 KiB
Nginx Configuration File
user {{ nginx_system_user }} {{ nginx_system_user }};
|
|
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
include {{ nginx_installation_directory }}/modules-enabled/*.conf;
|
|
|
|
error_log {{ nginx_global_error_log }};
|
|
|
|
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; # Hide Server Tokens like Version for Security
|
|
|
|
# server_names_hash_bucket_size 64;
|
|
# server_name_in_redirect off;
|
|
|
|
include {{ nginx_installation_directory }}/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
##
|
|
# SSL Settings
|
|
##
|
|
|
|
include {{ nginx_snippets_directory }}/ssl;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log {{ nginx_global_access_log }};
|
|
error_log {{ nginx_global_error_log }};
|
|
|
|
##
|
|
# 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;
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
##
|
|
# HTTP to HTTPs redirect
|
|
##
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
include {{ nginx_snippets_directory }}/acme;
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
##
|
|
# Virtual Host Configs
|
|
##
|
|
|
|
include {{ nginx_installation_directory }}/conf.d/*.conf;
|
|
|
|
include {{ nginx_sites_directory }}/*;
|
|
include {{ nginx_upstreams_directory }}/*;
|
|
|
|
}
|
|
|
|
stream {
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
include {{ nginx_streams_directory }}/*;
|
|
|
|
}
|