You've already forked nginxsnippets
initial commit
This commit is contained in:
98
nginxconf/nginx.conf
Normal file
98
nginxconf/nginx.conf
Normal file
@@ -0,0 +1,98 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
use epoll;
|
||||
multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
##### BASIC SETTINGS ####################### LAST UPDATED 08022021 #####
|
||||
#
|
||||
port_in_redirect off;
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
keepalive_requests 100;
|
||||
types_hash_max_size 2048;
|
||||
server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
client_body_buffer_size 10K;
|
||||
client_header_buffer_size 4k;
|
||||
client_max_body_size 50m;
|
||||
large_client_header_buffers 2 4k;
|
||||
client_body_timeout 10;
|
||||
client_header_timeout 10;
|
||||
send_timeout 2;
|
||||
reset_timedout_connection on;
|
||||
#
|
||||
##### BASIC SETTINGS ####################### LAST UPDATED 08022021 #####
|
||||
|
||||
##### SSL SETTINGS ######################### LAST UPDATED 08022021 #####
|
||||
#
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
#
|
||||
##### SSL SETTINGS ######################### LAST UPDATED 08022021 #####
|
||||
|
||||
##### CLOUDFLARE SHOW REAL IPs ############# LAST UPDATED 08022021 #####
|
||||
include /etc/nginx/nginxsnippets/cloudflare.conf;
|
||||
##### CLOUDFLARE SHOW REAL IPs ############# LAST UPDATED 08022021 #####
|
||||
|
||||
# BLOCK BAD REFERER AND BAD BOTS ########### LAST UPDATED 08022021 #####
|
||||
include /etc/nginx/nginxsnippets/block-referer.conf;
|
||||
include /etc/nginx/nginxsnippets/block-bots.conf;
|
||||
# BLOCK BAD REFERER AND BAD BOTS ########### LAST UPDATED 08022021 #####
|
||||
|
||||
##### LOG SETTINGS ONLY LOG CRITICAL MSG ### LAST UPDATED 08022021 #####
|
||||
include /etc/nginx/nginxsnippets/log.conf;
|
||||
access_log /var/log/nginx/access.log main;
|
||||
error_log /var/log/nginx/error.log crit;
|
||||
access_log on;
|
||||
log_not_found off;
|
||||
#
|
||||
##### LOG SETTINGS ONLY LOG CRITICAL MSG ### LAST UPDATED 08022021 #####
|
||||
|
||||
##### GZIP SETTINGS ######################## LAST UPDATED 08022021 #####
|
||||
#
|
||||
include /etc/nginx/nginxsnippets/gzipconfig.conf;
|
||||
#
|
||||
##### GZIP SETTINGS ######################## LAST UPDATED 08022021 #####
|
||||
|
||||
##### CACHE SETTINGS ####################### LAST UPDATED 08022021 #####
|
||||
#
|
||||
# open_file_cache max=10000 inactive=20s;
|
||||
# open_file_cache_valid 30s;
|
||||
# open_file_cache_min_uses 2;
|
||||
# open_file_cache_errors on;
|
||||
#
|
||||
##### CACHE SETTINGS ####################### LAST UPDATED 08022021 #####
|
||||
|
||||
##### FASTCGI SETTINGS ##################### LAST UPDATED 08022021 #####
|
||||
#
|
||||
upstream php-fpm {
|
||||
server unix:/var/run/php/phpVERSION-fpm.sock;
|
||||
}
|
||||
fastcgi_read_timeout 300;
|
||||
fastcgi_cache_path /var/cache/nginx/fcgi levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=1h;
|
||||
#
|
||||
##### FASTCGI SETTINGS ##################### LAST UPDATED 08022021 #####
|
||||
|
||||
##### VHOST SETTINGS ####################### LAST UPDATED 08022021 #####
|
||||
#
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /etc/nginx/static-sites/*.conf;
|
||||
#
|
||||
##### VHOST SETTINGS ####################### LAST UPDATED 08022021 #####
|
||||
}
|
Reference in New Issue
Block a user