Advertisement
Guest User

WPH Nginx.conf

a guest
Apr 14th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 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. events
  7. {
  8. use epoll;
  9. worker_connections 51200;
  10. multi_accept on;
  11. }
  12.  
  13. http
  14. {
  15. include mime.types;
  16. #include luawaf.conf;
  17.  
  18. include proxy.conf;
  19.  
  20. default_type application/octet-stream;
  21.  
  22. server_names_hash_bucket_size 512;
  23. client_header_buffer_size 32k;
  24. large_client_header_buffers 4 32k;
  25. client_max_body_size 50m;
  26.  
  27. sendfile on;
  28. tcp_nopush on;
  29.  
  30. keepalive_timeout 60;
  31.  
  32. tcp_nodelay on;
  33.  
  34. fastcgi_connect_timeout 300;
  35. fastcgi_send_timeout 300;
  36. fastcgi_read_timeout 300;
  37. fastcgi_buffer_size 64k;
  38. fastcgi_buffers 4 64k;
  39. fastcgi_busy_buffers_size 128k;
  40. fastcgi_temp_file_write_size 256k;
  41. fastcgi_intercept_errors on;
  42.  
  43. gzip on;
  44. gzip_min_length 1k;
  45. gzip_buffers 4 16k;
  46. gzip_http_version 1.1;
  47. gzip_comp_level 6;
  48. gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
  49. gzip_vary on;
  50. gzip_proxied any;
  51. gzip_disable "MSIE [1-6]\.";
  52.  
  53. brotli on;
  54.  
  55. limit_conn_zone $binary_remote_addr zone=perip:10m;
  56. limit_conn_zone $server_name zone=perserver:10m;
  57.  
  58. server_tokens off;
  59. access_log off;
  60. autoindex off;
  61.  
  62. add_header X-XSS-Protection "1; mode=block";
  63. add_header X-Content-Type-Options nosniff;
  64.  
  65. server
  66. {
  67. listen 888;
  68. server_name phpmyadmin;
  69. index index.html index.htm index.php;
  70. root /www/server/phpmyadmin;
  71. location ~ /tmp/ {
  72. return 403;
  73. }
  74.  
  75. #error_page 404 /404.html;
  76. include enable-php.conf;
  77.  
  78.  
  79. # BEGIN WP Hide & Security Enhancer
  80. rewrite "^/e028d44bb9c0f3c748a77e4a6cc135a2/rewrite_test" /wp-content/plugins/wp-hide-security-enhancer-pro/include/rewrite-confirm.php last;
  81. # END WP Hide & Security Enhancer
  82. # BEGIN WP Hide & Security Enhancer
  83. rewrite "^/nuvomib/(.+)" /wp-includes/$1 last;
  84. rewrite "^/loguveq/(.+)" /wp-content/uploads/$1 last;
  85. rewrite ^/wp-content/uploads(.+) /loguveq/$1 redirect;
  86. rewrite "^/license.txt" /index.php?wph-throw-404 last;
  87. rewrite "^/readme.html" /index.php?wph-throw-404 last;
  88. rewrite "^/qigetog/(.+)" /wp-content/$1 last;
  89. rewrite "^/wp-content(.+)" /index.php?wph-throw-404 last;
  90. rewrite "^/jamidun(.*)" /wp-admin/admin-ajax.php$1 last;
  91. rewrite "^/wp-admin/jamidun(.*)" /wp-admin/admin-ajax.php$1 last;
  92. rewrite "^/admin-ajax.php(.+)" /index.php?wph-throw-404 last;
  93. rewrite "^/authority/$" /wp-admin/index.php last;
  94. rewrite "^/authority(.*)" /wp-admin$1 last;
  95. rewrite "^/wp-admin(.+)" /index.php?wph-throw-404 last;
  96. # END WP Hide & Security Enhancer
  97.  
  98. location /
  99. {
  100. index index.php index.html index.htm;
  101. try_files $uri $uri/ /index.php?$args;
  102. }
  103.  
  104. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  105. {
  106. expires 30d;
  107. }
  108.  
  109. location ~ .*\.(js|css)?$
  110. {
  111. expires 24h;
  112. }
  113.  
  114. location ~ /\.
  115. {
  116. deny all;
  117. }
  118.  
  119. access_log /www/wwwlogs/access.log;
  120.  
  121. }
  122. include /www/server/panel/vhost/nginx/*.conf;
  123. }
  124.  
  125.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement