1
0
IaC/ansible/roles/nginx/templates/nginx.conf.j2

49 lines
904 B
Plaintext
Raw Normal View History

2024-04-21 09:37:46 -04:00
user {{ nginx_user }};
worker_processes auto;
worker_cpu_affinity auto;
# include extra config
include /etc/nginx/conf.d/*.conf;
events {
multi_accept on;
worker_connections 1024;
}
http {
charset utf-8;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
log_not_found off;
types_hash_max_size 4096;
client_max_body_size 16M;
# MIME
include mime.types;
default_type application/octet-stream;
# Include SSL config
include ssl/ssl.conf;
server {
listen 80 default_server;
server_name "_";
return 444;
}
server {
listen 443 ssl http2 default_server;
server_name "_";
ssl_reject_handshake on;
}
# logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
# include sites
include /etc/nginx/sites-enabled/*.conf;
}