Config
exemplo de nginx.conf
user nginx;
worker_processes 8;
worker_rlimit_nofile 100000;
pid /var/run/nginx.pid;
events {
# max clients = worker_connections * worker_processes
# max clients is also limited by the number of socket connections available on the system (~64k)
worker_connections 1024;
# optimized to serve many clients with each thread, essential for linux -- for testing environment
use epoll;
# accept as many connections as possible, may flood worker connections if set too low -- for testing environment
multi_accept on;
}
http {
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log on;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;
# tuning
reset_timedout_connection on;
client_body_timeout 10;
send_timeout 2;
keepalive_timeout 30;
keepalive_requests 100000;
open_file_cache max=200000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
sendfile on;
tcp_nopush on;
include /etc/nginx/mime.types;
include /etc/nginx/gzip.conf;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.blog/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.chat/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.dev/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.photos/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.forum/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.io/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.review/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.tools/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.us/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.tube/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.stream/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.in/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.studio/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.events/*.conf;
include /etc/nginx/conf.d/bolhaverse/bolha.network/*.conf;
}
stream {
include /etc/nginx/conf.d/bolhaverse/stream/*.conf;
}