From 6844de5932dc5038ca9b0a33eb6274a25cecc693 Mon Sep 17 00:00:00 2001 From: Mitchell Krog Date: Wed, 4 Oct 2017 13:52:03 +0200 Subject: [PATCH] RE-TEST Nginx MainStream/Development Version Test --- .dev-tools/_nginx_conf_backup/nginx13.conf | 156 ++++++++------------- 1 file changed, 56 insertions(+), 100 deletions(-) diff --git a/.dev-tools/_nginx_conf_backup/nginx13.conf b/.dev-tools/_nginx_conf_backup/nginx13.conf index 29bc085f2..b85f035da 100755 --- a/.dev-tools/_nginx_conf_backup/nginx13.conf +++ b/.dev-tools/_nginx_conf_backup/nginx13.conf @@ -1,117 +1,73 @@ - -#user nobody; -worker_processes 1; - -#error_log logs/error.log; -#error_log logs/error.log notice; -#error_log logs/error.log info; - -#pid logs/nginx.pid; - +user www-data; +worker_processes auto; +pid /run/nginx.pid; +include /etc/nginx/modules-enabled/*.conf; events { - worker_connections 1024; + worker_connections 1024; + multi_accept on; + use epoll; } - http { - include 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"'; + ## + # Basic Settings + ## - #access_log logs/access.log main; + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 90s; + keepalive_requests 1000; + server_tokens off; + client_body_buffer_size 32k; + client_header_buffer_size 1k; + client_max_body_size 50M; + types_hash_max_size 2048; + large_client_header_buffers 4 16k; + variables_hash_max_size 2048; + variables_hash_bucket_size 1024; - sendfile on; - #tcp_nopush on; + # Our request limiter zone for wp-login attacks + limit_req_zone $binary_remote_addr zone=wp-login:10m rate=1r/s; + - #keepalive_timeout 0; - keepalive_timeout 65; + include /etc/nginx/mime.types; + default_type application/octet-stream; - #gzip on; + ## + # Logging Settings + ## + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; - server { - listen 80; - server_name localhost; + access_log /var/log/nginx/access.log main; + error_log /var/log/nginx/error.log warn; - #charset koi8-r; + ## + # Gzip Settings + ## - #access_log logs/host.access.log main; + gzip on; + gzip_disable "MSIE [1-6]\."; + gzip_vary on; + gzip_static on; + gzip_min_length 20; + gzip_proxied expired no-cache no-store private auth; + gzip_comp_level 7; + gzip_buffers 32 4k; + gzip_http_version 1.1; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; - location / { - root html; - index index.html index.htm; - } + ## + # Virtual Host Configs + ## - #error_page 404 /404.html; - - # redirect server error pages to the static page /50x.html - # - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root html; - } - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} - } - - - # another virtual host using mix of IP-, name-, and port-based configuration - # - #server { - # listen 8000; - # listen somename:8080; - # server_name somename alias another.alias; - - # location / { - # root html; - # index index.html index.htm; - # } - #} - - - # HTTPS server - # - #server { - # listen 443 ssl; - # server_name localhost; - - # ssl_certificate cert.pem; - # ssl_certificate_key cert.key; - - # ssl_session_cache shared:SSL:1m; - # ssl_session_timeout 5m; - - # ssl_ciphers HIGH:!aNULL:!MD5; - # ssl_prefer_server_ciphers on; - - # location / { - # root html; - # index index.html index.htm; - # } - #} + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; } + +