Created
December 12, 2018 00:02
-
-
Save wpupru/b428c6e0da27a17a8860e9c0f80b1a5b to your computer and use it in GitHub Desktop.
Nginx_original_Brainy
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 nginx nginx; | |
| worker_processes 2; | |
| pcre_jit on; | |
| error_log /var/log/nginx/error.log; | |
| #error_log /var/log/nginx/error.log notice; | |
| #error_log /var/log/nginx/error.log info; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 2048; | |
| } | |
| http { | |
| 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"' | |
| 'cs=$upstream_cache_status'; | |
| charset utf-8; | |
| access_log /var/log/nginx/access.log main; | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay on; | |
| reset_timedout_connection on; | |
| keepalive_timeout 60; | |
| server_tokens off; | |
| server_names_hash_max_size 128; | |
| server_names_hash_bucket_size 256; | |
| client_header_timeout 15m; | |
| client_body_timeout 15m; | |
| send_timeout 15m; | |
| client_max_body_size 700m; | |
| connection_pool_size 256; | |
| client_body_buffer_size 1024k; | |
| client_header_buffer_size 8k; | |
| gzip off; | |
| #proxy_temp_path /var/lib/nginx/proxy 1 2; | |
| #proxy_cache_valid 20s; | |
| #proxy_cache_key $scheme$proxy_host$request_uri$cookie_user; | |
| #proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:400m inactive=120m max_size=500M; | |
| #proxy_cache_min_uses 2; | |
| proxy_cache_valid 10s; | |
| proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=one:100m max_size=300M; | |
| proxy_cache_path /var/lib/nginx/cache1 levels=1:2 keys_zone=two:100m max_size=300M; | |
| proxy_temp_path /var/lib/nginx/proxy 1 2; | |
| proxy_ignore_headers Expires Cache-Control; | |
| proxy_cache_use_stale error timeout invalid_header http_502; | |
| proxy_cache_bypass $cookie_session; | |
| proxy_no_cache $cookie_session; | |
| proxy_cache_min_uses 2; | |
| limit_conn_zone $binary_remote_addr zone=lone:10m; | |
| limit_req_zone $binary_remote_addr zone=ltwo:10m rate=5r/s; | |
| limit_req_zone $binary_remote_addr zone=lstrict:10m rate=1r/s; | |
| limit_req_zone $binary_remote_addr zone=highspeed:10m rate=10r/s; | |
| fastcgi_cache_path /var/lib/nginx/fpm levels=1:2 keys_zone=fcgi:32m max_size=100m; | |
| fastcgi_cache_path /var/lib/nginx/fpm2 levels=1:2 keys_zone=fcgi2:32m max_size=100m; | |
| # fastcgi_cache_key "$scheme$request_method$host$request_uri$cookie_user"; | |
| fastcgi_temp_path /var/lib/nginx/fastcgi 1 2; | |
| fastcgi_ignore_headers Expires Cache-Control; | |
| fastcgi_cache_use_stale error timeout invalid_header; | |
| # fastcgi_param PHP_ADMIN_VALUE "display_errors=off"; | |
| limit_conn_zone $binary_remote_addr zone=lfcgi:10m; | |
| limit_req_zone $binary_remote_addr zone=lfsci2:10m rate=5r/s; | |
| resolver 8.8.8.8 8.8.4.4 valid=300s ipv6=off; | |
| resolver_timeout 5s; | |
| map $http_accept $webp_suffix { | |
| "~*webp" ".webp"; | |
| } | |
| # Load modular configuration files from the /etc/nginx/conf.d directory. | |
| # See http://nginx.org/en/docs/ngx_core_module.html#include | |
| # for more information. | |
| ModSecurityEnabled off; | |
| ModSecurityConfig modsecurity.conf; | |
| include /etc/nginx/conf.d/*.conf; | |
| index index.php index.html index.htm; | |
| server { | |
| root /var/www/html; | |
| access_log /etc/nginx/vhost_logs/default_access; | |
| error_log /etc/nginx/vhost_logs/default_error; | |
| location / { | |
| root /var/www/html; | |
| index index.php index.html index.htm; | |
| } | |
| } | |
| include /etc/nginx/sites-available/*.conf; | |
| # another virtual host using mix of IP-, name-, and port-based configuration | |
| # | |
| #server { | |
| # listen 8000; | |
| # listen somename:8080; | |
| # server_name somename alias another.alias; | |
| # root html; | |
| # location / { | |
| # } | |
| #} | |
| # HTTPS server | |
| # | |
| #server { | |
| # listen 443; | |
| # server_name localhost; | |
| # root html; | |
| # ssl on; | |
| # ssl_certificate cert.pem; | |
| # ssl_certificate_key cert.key; | |
| # ssl_session_timeout 5m; | |
| # ssl_protocols SSLv2 SSLv3 TLSv1; | |
| # ssl_ciphers HIGH:!aNULL:!MD5; | |
| # ssl_prefer_server_ciphers on; | |
| # location / { | |
| # } | |
| #} | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment