CinemaPress/config/default/nginx/nginx.conf

54 lines
1.6 KiB
Nginx Configuration File

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
server_names_hash_bucket_size 256;
server_names_hash_max_size 4096;
variables_hash_max_size 4096;
variables_hash_bucket_size 4096;
limit_req_zone $binary_remote_addr zone=flood:50m rate=90r/s;
limit_conn_zone $binary_remote_addr zone=addr:50m;
limit_req_zone $binary_remote_addr zone=cinemapress:10m rate=30r/s;
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"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss image/svg+xml text/javascript application/javascript;
gzip_vary on;
gzip_proxied any;
gzip_http_version 1.1;
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed EnableFilters collapse_whitespace,remove_comments,dedup_inlined_images;
pagespeed DisableFilters rewrite_css,add_head;
pagespeed ReportUnloadTime off;
pagespeed Statistics off;
pagespeed StatisticsLogging off;
pagespeed Disallow "*/admin*";
include /etc/nginx/conf.d/*.conf;
include /home/*/config/production/nginx/conf.d/nginx.conf;
}