keoulvi

nginx.conf default with modules

Jan 9th, 2021 (edited)
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.12 KB | None | 0 0
  1. user  www www;
  2. worker_processes auto;
  3. error_log  /www/wwwlogs/nginx_error.log  crit;
  4. pid        /www/server/nginx/logs/nginx.pid;
  5. worker_rlimit_nofile 51200;
  6. load_module modules/ngx_http_brotli_filter_module.so;
  7. load_module modules/ngx_http_brotli_static_module.so;
  8. load_module modules/ngx_http_naxsi_module.so; # load naxsi
  9. load_module modules/ngx_pagespeed.so;
  10.  
  11. events
  12.     {
  13.         use epoll;
  14.         worker_connections 51200;
  15.         multi_accept on;
  16.     }
  17.  
  18. http
  19.     {
  20.         include       mime.types;
  21.         #include luawaf.conf;
  22.  
  23.         include proxy.conf;
  24.         include /www/server/naxsi/naxsi_config/naxsi_core.rules;
  25.         default_type  application/octet-stream;
  26.         server_names_hash_bucket_size 512;
  27.         client_header_buffer_size 32k;
  28.         large_client_header_buffers 4 32k;
  29.         client_max_body_size 50m;
  30.  
  31.         sendfile   on;
  32.         tcp_nopush on;
  33.  
  34.         keepalive_timeout 60;
  35.  
  36.         tcp_nodelay on;
  37.  
  38.         fastcgi_connect_timeout 300;
  39.         fastcgi_send_timeout 300;
  40.         fastcgi_read_timeout 300;
  41.         fastcgi_buffer_size 64k;
  42.         fastcgi_buffers 4 64k;
  43.         fastcgi_busy_buffers_size 128k;
  44.         fastcgi_temp_file_write_size 256k;
  45.         fastcgi_intercept_errors on;
  46.        
  47.         gzip on;
  48.         gzip_min_length  1k;
  49.         gzip_buffers     4 16k;
  50.         gzip_http_version 1.1;
  51.         gzip_comp_level 2;
  52.         gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
  53.         gzip_vary on;
  54.         gzip_proxied   expired no-cache no-store private auth;
  55.         gzip_disable   "MSIE [1-6]\.";
  56.  
  57.         brotli              on;
  58. brotli_comp_level 11;
  59. brotli_static on;
  60. brotli_types application/atom+xml application/javascript application/json application/rss+xml
  61.              application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
  62.              application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
  63.              font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
  64.              image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;  
  65.        
  66.         pagespeed on;
  67.         pagespeed MessageBufferSize 10240;
  68.         pagespeed FileCachePath /www/server/ngx_pagespeed_cache;
  69.         pagespeed RewriteLevel OptimizeForBandwidth;
  70.        
  71.         limit_conn_zone $binary_remote_addr zone=perip:10m;
  72.         limit_conn_zone $server_name zone=perserver:10m;
  73.  
  74.         server_tokens off;
  75.         access_log off;
  76.  
  77. server
  78.     {
  79.         listen 888;
  80.         server_name phpmyadmin;
  81.         index index.html index.htm index.php;
  82.         root  /www/server/phpmyadmin;
  83.    
  84.         #error_page   404   /404.html;
  85.         include enable-php.conf;
  86.  
  87.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  88.         {
  89.             expires      30d;
  90.         }
  91.  
  92.         location ~ .*\.(js|css)?$
  93.         {
  94.             expires      12h;
  95.         }
  96.  
  97.         location ~ /\.
  98.         {
  99.             deny all;
  100.         }
  101.         access_log  /www/wwwlogs/access.log;
  102.     }
  103.    
  104. include /www/server/panel/vhost/nginx/*.conf;
  105. }
  106.  
  107.  
Add Comment
Please, Sign In to add comment