etc-configs/nginx/nginx.conf

70 lines
1.6 KiB
Nginx Configuration File
Raw Normal View History

2024-01-10 00:40:02 -03:00
user www-data;
2022-12-03 01:01:28 -03:00
worker_processes auto;
worker_rlimit_nofile 65535;
2024-01-10 00:40:02 -03:00
pid /run/nginx.pid;
2023-12-21 15:17:35 -03:00
# Include modules
2022-12-03 01:01:28 -03:00
include /etc/nginx/modules-enabled/*.conf;
events {
2024-01-10 00:40:02 -03:00
worker_connections 2048;
2023-12-21 15:17:35 -03:00
multi_accept off;
2022-12-03 01:01:28 -03:00
}
http {
2023-12-21 15:17:35 -03:00
log_format limited '$remote_addr - $remote_user [$time_local] '
'"$request_method /bogus $server_protocol" $status $body_bytes_sent '
'"-" "Bogus/66.6"';
2023-12-21 14:01:35 -03:00
access_log off;
error_log /dev/null;
2022-12-03 01:01:28 -03:00
2023-12-21 15:17:35 -03:00
# Basic Settings
charset utf-8;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
log_not_found off;
types_hash_max_size 1024;
types_hash_bucket_size 64;
2023-12-21 14:01:35 -03:00
server_names_hash_bucket_size 128;
2023-12-21 15:17:35 -03:00
# MIME
include mime.types;
#default_type application/octet-stream;
2023-12-21 15:17:35 -03:00
# SSL
2024-01-14 04:03:37 -03:00
include configs/ssl.conf;
2023-12-21 15:17:35 -03:00
# reset timed out connections freeing ram
reset_timedout_connection on;
# maximum time between packets the client can pause when sending nginx any data
client_body_timeout 10s;
# maximum time the client has to send the entire header to nginx
client_header_timeout 10s;
# timeout which a single keep-alive client connection will stay open
keepalive_timeout 60s;
# maximum time between packets nginx is allowed to pause when sending the client data
send_timeout 10s;
2024-01-10 00:40:02 -03:00
#client_body_buffer_size 32k;
#client_max_body_size 2m;
2024-01-10 00:40:02 -03:00
#open_file_cache max=1024 inactive=10s;
#open_file_cache_valid 60s;
#open_file_cache_min_uses 2;
#open_file_cache_errors on;
2023-12-21 15:17:35 -03:00
# PERFORMANCE / ASYNC I/O
aio threads=default;
aio_write on;
directio 2m;
2023-12-21 14:01:35 -03:00
# Maps
2023-12-21 15:17:35 -03:00
include /etc/nginx/snippets/maps.conf;
2023-12-21 16:06:15 -03:00
include /etc/nginx/snippets/poop.conf;
2024-01-14 04:03:37 -03:00
include /etc/nginx/configs/upstreams.conf;
2023-12-21 16:06:15 -03:00
include /etc/nginx/conf.d/*.conf;
2022-12-03 01:01:28 -03:00
}