Skip to content

Commit

Permalink
feat(nginx): base config file
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Jan 13, 2024
1 parent facf05b commit f5c1304
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nginx/etc/nginx/templates/00-main.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Run as a unique, less privileged user for security reasons.
# user www-data www-data; # user group
user nginx;

# The file storing the process ID of the main process
pid /var/run/nginx.pid;

# Reduces timer resolution in worker processes, thus reducing the number of gettimeofday() system calls made. By default, gettimeofday() is called each time a kernel event is received. With reduced resolution, gettimeofday() is only called once per specified interval.
timer_resolution 100ms;

# Defines named thread pools used for multi-threaded reading and sending of files without blocking worker processes.
thread_pool default threads=32 max_queue=65536;
12 changes: 12 additions & 0 deletions nginx/etc/nginx/templates/10-event.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
events {
# Specifies the connection processing method to use (https://nginx.org/en/docs/events.html).
# There is normally no need to specify it explicitly, because nginx will by default use the most efficient method.
# use epoll;

# Sets the maximum number of simultaneous connections that can be opened by a worker process.
# Should be < worker_rlimit_nofile.
worker_connections $NGINX_WORKER_CONNECTIONS;

# accept as many connections as possible, may flood worker connections if set too low -- for testing environment
# multi_accept on;
}
4 changes: 4 additions & 0 deletions nginx/etc/nginx/templates/20-http-include.conf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
http {
include /etc/nginx/conf.d/http.d/*.conf;
include /etc/nginx/conf.d/server.d/*.conf;
}

0 comments on commit f5c1304

Please # to comment.