Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Tune nginx.conf for perf improvement #38

Open
wants to merge 1 commit into
base: oneUpdateFile
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions roles/nginx/files/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pid /var/run/nginx.pid;

events {
###
# good overall speed on RPi with this setting
# good overall speed
worker_connections 1536;

###
Expand All @@ -20,35 +20,44 @@ http {
##
# Basic Settings
##


server_names_hash_bucket_size 64;

include /etc/nginx/mime.types;
default_type application/octet-stream;

###
# Speed up landing page by caching open file descriptors
open_file_cache max=2048;

##
open_file_cache max=2000 inactive=20s;
open_file_cache_valid 60s;
open_file_cache_min_uses 5;
open_file_cache_errors off;

##
# Logging Settings
# don't log, we don't need to know normally
#access_log off;
#error_log off;
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip off;
gzip_disable "msie6";

gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;


##
# Buffer Settings
##
client_max_body_size 700m;
client_body_timeout 500s;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
large_client_header_buffers 2 1k;
}