Alan Orth
fe6c733cae
It seems tcp_nopush is meant to be used with sendfile in newer versions of nginx. See: https://github.com/h5bp/server-configs-nginx/blob/master/nginx.conf See: https://t37.net/nginx-optimization-understanding-sendfile-tcp_nodelay-and-tcp_nopush.html Signed-off-by: Alan Orth <alan.orth@gmail.com>
57 lines
1.6 KiB
Nginx Configuration File
57 lines
1.6 KiB
Nginx Configuration File
|
|
user nginx;
|
|
worker_processes auto;
|
|
|
|
error_log /var/log/nginx/error.log error;
|
|
pid /var/run/nginx.pid;
|
|
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
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"';
|
|
|
|
server_tokens off;
|
|
|
|
access_log off;
|
|
|
|
# Speed up file transfers by using sendfile() to copy directly
|
|
# between descriptors rather than using read()/write().
|
|
# For performance reasons, on FreeBSD systems w/ ZFS
|
|
# this option should be disabled as ZFS's ARC caches
|
|
# frequently used files in RAM by default.
|
|
sendfile on;
|
|
|
|
# Tell Nginx not to send out partial frames; this increases throughput
|
|
# since TCP frames are filled up before being sent out. (adds TCP_CORK)
|
|
tcp_nopush on;
|
|
|
|
keepalive_timeout 65s;
|
|
|
|
gzip on;
|
|
|
|
# Tell proxies to cache both the gzipped and regular version of a resource
|
|
# whenever the client's Accept-Encoding capabilities header varies;
|
|
# Avoids the issue where a non-gzip capable client (which is extremely rare
|
|
# today) would display gibberish if their proxy gave them the gzipped version.
|
|
gzip_vary on;
|
|
gzip_comp_level 6;
|
|
gzip_min_length 860;
|
|
gzip_disable "msie6";
|
|
gzip_http_version 1.1;
|
|
gzip_types text/plain text/css text/xml application/rss+xml application/javascript image/svg+xml;
|
|
|
|
client_max_body_size 12m;
|
|
|
|
include fastcgi_cache;
|
|
include /etc/nginx/conf.d/*.conf;
|
|
}
|