44 lines
No EOL
1.3 KiB
Nginx Configuration File
44 lines
No EOL
1.3 KiB
Nginx Configuration File
user www-data;
|
|
worker_processes auto;
|
|
pid /var/run/nginx.pid;
|
|
events {
|
|
worker_connections 2048;
|
|
multi_accept on; use epoll;
|
|
}
|
|
http {
|
|
log_format criegerde escape=json
|
|
'{'
|
|
'"time_local":"$time_local",'
|
|
'"remote_addr":"$remote_addr",'
|
|
'"remote_user":"$remote_user",'
|
|
'"request":"$request",'
|
|
'"status": "$status",'
|
|
'"body_bytes_sent":"$body_bytes_sent",'
|
|
'"request_time":"$request_time",'
|
|
'"http_referrer":"$http_referer",'
|
|
'"http_user_agent":"$http_user_agent"'
|
|
'}';
|
|
server_names_hash_bucket_size 64;
|
|
access_log /var/log/nginx/access.log criegerde;
|
|
error_log /var/log/nginx/error.log warn;
|
|
# replace 192.168.2.254 with the ip of HAProxy or Failover-IP
|
|
set_real_ip_from 192.168.2.254;
|
|
real_ip_header proxy_protocol;
|
|
real_ip_recursive on;
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
sendfile on;
|
|
send_timeout 3600;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
open_file_cache max=500 inactive=10m;
|
|
open_file_cache_errors on;
|
|
keepalive_timeout 65;
|
|
reset_timedout_connection on;
|
|
server_tokens off;
|
|
# replace 127.0.0.53 with the ip of your DNS resolver
|
|
resolver 127.0.0.53 valid=30s;
|
|
resolver_timeout 5s;
|
|
include /etc/nginx/conf.d/*.conf;
|
|
}
|
|
# Carsten Rieger IT-Services, https://www.c-rieger.de |