Created
February 12, 2020 22:07
-
-
Save mrprompt/f5fbfaad7b32fae5fcce809ee2e48567 to your computer and use it in GitHub Desktop.
nginx conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
pid /run/nginx.pid; | |
worker_rlimit_nofile 100000; | |
events { | |
#worker_connections 1024; | |
worker_connections 10000; | |
use epoll; | |
multi_accept on; | |
# accept_mutex off; | |
} | |
http { | |
## | |
# Basic Settings | |
## | |
sendfile on; | |
# sendfile_max_chunk 512k; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 10; | |
# keepalive_requests 100000; | |
# types_hash_max_size 2048; | |
server_tokens off; | |
# reset_timedout_connection on; | |
# client_body_timeout 10; | |
# send_timeout 2; | |
# server_names_hash_bucket_size 64; | |
# server_name_in_redirect off; | |
# proxy_buffering off; | |
default_type application/octet-stream; | |
include /etc/nginx/mime.types; | |
## | |
# Logging Settings | |
## | |
access_log off; | |
#error_log /var/log/nginx/error.log crit; | |
## | |
# Gzip Settings | |
## | |
gzip on; | |
gzip_disable "msie6"; | |
gzip_min_length 10240; | |
gzip_proxied expired no-cache no-store private auth; | |
gzip_vary on; | |
gzip_proxied any; | |
gzip_comp_level 5; | |
gzip_buffers 16 8k; | |
gzip_http_version 1.1; | |
gzip_types application/atom+xml | |
application/javascript | |
application/json | |
application/rss+xml | |
application/vnd.ms-fontobject | |
application/x-font-ttf | |
application/x-web-app-manifest+json | |
application/xhtml+xml | |
application/xml | |
font/opentype | |
image/svg+xml | |
image/x-icon | |
text/css | |
text/plain | |
text/x-component | |
image/webp | |
image/apng | |
image/jpeg | |
application/x-javascript | |
; | |
## | |
# nginx-naxsi config | |
## | |
# Uncomment it if you installed nginx-naxsi | |
## | |
#include /etc/nginx/naxsi_core.rules; | |
## | |
# nginx-passenger config | |
## | |
# Uncomment it if you installed nginx-passenger | |
## | |
#passenger_root /usr; | |
#passenger_ruby /usr/bin/ruby; | |
## | |
# upload config | |
## | |
client_max_body_size 50m; | |
client_body_buffer_size 128k; | |
client_header_buffer_size 1k; | |
large_client_header_buffers 4 4k; | |
output_buffers 1 32k; | |
postpone_output 1460; | |
## | |
# Caching | |
## | |
open_file_cache max=1000 inactive=20s; | |
open_file_cache_valid 30s; | |
open_file_cache_min_uses 5; | |
open_file_cache_errors off; | |
## Block spammers and other unwanted visitors ## | |
include /etc/nginx/blockips.conf; | |
## | |
# Virtual Host Configs | |
## | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment