Skip to content

Commit

Permalink
Update nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Publish3r committed Sep 10, 2024
1 parent b2f0ae0 commit 46669ba
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions configs/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
load_module '/usr/lib/nginx/modules/ngx_stream_module.so';
worker_processes auto;
worker_rlimit_nofile 35000;

# Maximum number of open files per worker process.
# Should be > worker_connections.
worker_rlimit_nofile 8192;

events {
worker_connections 15000;
multi_accept off;
# If you need more connections than this, you start optimizing your OS.
# That's probably the point at which you hire people who are smarter than you as this is *a lot* of requests.
# Should be < worker_rlimit_nofile.
worker_connections 8000;
}

# Log errors and warnings to this file
# This is only used when you don't override it on a server{} level
error_log /dev/stderr warn;

# Free some CPU cycles
timer_resolution 500ms;

http {

client_body_timeout 10s;
client_header_timeout 10s;
keepalive_timeout 20s 20s;
send_timeout 10s;

access_log off;
error_log /dev/null crit;
server {
listen 8080 default_server;
listen [::]:8080 default_server;
Expand All @@ -23,7 +41,6 @@ http {


stream {
error_log /dev/null crit;
server {
resolver 1.1.1.1 ipv6=off;
listen 8443;
Expand All @@ -32,4 +49,4 @@ stream {
proxy_connect_timeout 5s;
proxy_pass $ssl_preread_server_name:443;
}
}
}

0 comments on commit 46669ba

Please sign in to comment.