2014-08-16 23:35:57 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2016-03-12 18:27:56 +01:00
|
|
|
# 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.
|
2014-08-16 23:35:57 +02:00
|
|
|
sendfile on;
|
2016-03-13 23:07:35 +01:00
|
|
|
|
|
|
|
# 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;
|
2014-08-16 23:35:57 +02:00
|
|
|
|
2016-03-12 18:02:57 +01:00
|
|
|
keepalive_timeout 65s;
|
2014-08-16 23:35:57 +02:00
|
|
|
|
|
|
|
gzip on;
|
2016-03-12 18:25:57 +01:00
|
|
|
|
|
|
|
# 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.
|
2014-08-16 23:35:57 +02:00
|
|
|
gzip_vary on;
|
2015-03-09 08:21:34 +01:00
|
|
|
gzip_comp_level 6;
|
2014-08-16 23:35:57 +02:00
|
|
|
gzip_min_length 860;
|
|
|
|
gzip_disable "msie6";
|
|
|
|
gzip_http_version 1.1;
|
2016-03-12 18:16:23 +01:00
|
|
|
gzip_types text/plain text/css text/xml application/rss+xml application/javascript image/svg+xml;
|
2014-08-16 23:35:57 +02:00
|
|
|
|
|
|
|
client_max_body_size 12m;
|
|
|
|
|
2015-02-10 21:04:28 +01:00
|
|
|
include fastcgi_cache;
|
2014-08-16 23:35:57 +02:00
|
|
|
include /etc/nginx/conf.d/*.conf;
|
|
|
|
}
|