121 lines
2.2 KiB
Nginx Configuration File
121 lines
2.2 KiB
Nginx Configuration File
user www-data;
|
|
worker_processes auto;
|
|
pid /run/nginx.pid;
|
|
include /etc/nginx/modules-enabled/*.conf;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
# multi_accept on;
|
|
}
|
|
|
|
http {
|
|
|
|
##
|
|
# Basic Settings
|
|
##
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_disable msie6;
|
|
keepalive_requests 100;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
server_tokens off;
|
|
|
|
proxy_max_temp_file_size 20480m;
|
|
|
|
# server_names_hash_bucket_size 64;
|
|
# server_name_in_redirect off;
|
|
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
##
|
|
# Logging Settings
|
|
##
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
#more_set_headers 'Server: secret';
|
|
|
|
aio threads;
|
|
aio_write on;
|
|
|
|
limit_conn_zone $binary_remote_addr zone=limit_per_ip:10m;
|
|
limit_conn limit_per_ip 128;
|
|
limit_req_zone $binary_remote_addr zone=allips:10m rate=150r/s;
|
|
limit_req zone=allips burst=150 nodelay;
|
|
|
|
gzip on;
|
|
gzip_comp_level 5;
|
|
gzip_min_length 512;
|
|
gzip_buffers 4 8k;
|
|
gzip_proxied any;
|
|
gzip_vary on;
|
|
gzip_disable "msie6";
|
|
gzip_types
|
|
text/css
|
|
text/javascript
|
|
text/xml
|
|
text/plain
|
|
text/x-component
|
|
application/javascript
|
|
application/x-javascript
|
|
application/json
|
|
application/xml
|
|
application/rss+xml
|
|
application/vnd.ms-fontobject
|
|
font/truetype
|
|
font/opentype
|
|
image/svg+xml;
|
|
|
|
#brotli on;
|
|
#brotli_static on;
|
|
#brotli_buffers 16 8k;
|
|
#brotli_comp_level 6;
|
|
#brotli_types
|
|
# text/css
|
|
# text/javascript
|
|
# text/xml
|
|
# text/plain
|
|
# text/x-component
|
|
# application/javascript
|
|
# application/x-javascript
|
|
# application/json
|
|
# application/xml
|
|
# application/rss+xml
|
|
# application/vnd.ms-fontobject
|
|
# font/truetype
|
|
# font/opentype
|
|
# image/svg+xml;
|
|
|
|
##
|
|
# Virtual Host Configs
|
|
##
|
|
include /etc/nginx/conf.d/*.conf;
|
|
include /etc/nginx/sites-enabled/*;
|
|
}
|
|
|
|
#mail {
|
|
# # See sample authentication script at:
|
|
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
|
|
#
|
|
# # auth_http localhost/auth.php;
|
|
# # pop3_capabilities "TOP" "USER";
|
|
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
|
|
#
|
|
# server {
|
|
# listen localhost:110;
|
|
# protocol pop3;
|
|
# proxy on;
|
|
# }
|
|
#
|
|
# server {
|
|
# listen localhost:143;
|
|
# protocol imap;
|
|
# proxy on;
|
|
# }
|
|
#}
|