user nginx nginx; error_log /var/log/nginx/error_log info; events { worker_connections 1024; use epoll; } http { include /etc/nginx/mime.types; # Unknown stuff is considered to be binaries default_type application/octet-stream; # Set a reasonably informing log format log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" ' '"$gzip_ratio"'; # Improve file upload to client by avoiding userspace copying tcp_nopush on; sendfile on; # Indexes are html by default index index.html; # General catch-all for HTTPS redirection, we don't like serving plain HTTP server { listen 80 default_server; return 301 https://$host$request_uri; } # Using Authelia SSO can lead to longer headers, better increase buffers proxy_headers_hash_max_size 512; proxy_headers_hash_bucket_size 128; # Add domains here (only the main config file for each domain!) include com.mydomain/mydomain.conf; }