Advertisement
Guest User

OST-Config for ASUS AC 5300

a guest
Feb 14th, 2024
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | Source Code | 0 0
  1. worker_processes auto;
  2. worker_rlimit_nofile 100000;
  3. user nobody;
  4. events {
  5. worker_connections 2048;
  6. multi_accept on;
  7. }
  8.  
  9. error_log /opt/var/log/nginx/error.log notice;
  10. pid /opt/var/run/nginx.pid;
  11. #pid /tmp/nginx.pid;
  12. http {
  13. include mime.types;
  14. default_type application/octet-stream;
  15. include /etc/nginx/conf.d/*.conf;
  16.  
  17.  
  18.  
  19. server {
  20. server_name _ localhost;
  21. listen 3000 reuseport;
  22. # listen 3001 ssl;
  23. listen [::]:3000 reuseport;
  24. #listen [::]:3001 ssl;
  25. # If you like to Enable HTTP2 add "http2" to the above line.
  26. # If HTTP2 Enabled. Upload location should Proxy_Pass to http 1.1 port.
  27. # Otherwise you will see abnormal Upload Speeds.
  28. # Nginx Server Windows SSL Performance was very poor! Better use Linux if you need SSL support.
  29. #ssl_certificate /etc/ssl/nginx.crt; # Use your own certificate & key
  30. #ssl_certificate_key /etc/ssl/nginx.key; # <-- key
  31. #ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
  32. #ssl_protocols TLSv1.1 TLSv1.2;
  33. #ssl_session_cache shared:SSL:10m;
  34. #ssl_session_timeout 10m;
  35. root share/nginx/html;
  36. index index.html;
  37. client_max_body_size 10000M;
  38. error_page 405 =200 $uri;
  39. access_log off;
  40. gzip off;
  41. fastcgi_read_timeout 999;
  42. log_not_found off;
  43. server_tokens off;
  44. error_log /dev/null; #Disable this for Windows Nginx.
  45. tcp_nodelay on;
  46. tcp_nopush on;
  47. sendfile on;
  48. open_file_cache max=200000 inactive=20s;
  49. open_file_cache_valid 30s;
  50. open_file_cache_min_uses 2;
  51. open_file_cache_errors off;
  52.  
  53. location / {
  54.  
  55. add_header 'Access-Control-Allow-Origin' "*" always;
  56. add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
  57. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
  58. #Very Very Important! You SHOULD send no-store from server for Google Chrome.
  59. add_header Cache-Control 'no-store, no-cache, max-age=0, no-transform';
  60. add_header Last-Modified $date_gmt;
  61. if_modified_since off;
  62. expires off;
  63. etag off;
  64.  
  65. if ($request_method = OPTIONS ) {
  66. add_header Access-Control-Allow-Credentials "true";
  67. add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With' always;
  68. add_header 'Access-Control-Allow-Origin' "$http_origin" always;
  69. add_header Access-Control-Allow-Methods "GET, POST, OPTIONS" always;
  70. return 204;
  71. }
  72. }
  73.  
  74. #HTTP2 & HTTP3 will not wait for the post body and return 200. We need to stop that behaviour.
  75. #Otherwise, you will see abnormal upload speed. To fix this issue, Enable the following lines. (Only Applicable If you Enabled HTTP2 or HTTP3 in This Server.)
  76.  
  77. #HTTP2 & HTTP3 -> UPLOAD FIX -- START
  78.  
  79. #location = /upload {
  80. #proxy_pass http://127.0.0.1:3000/dev-null;
  81. #}
  82. #location = /dev-null {
  83. #return 200;
  84. #}
  85.  
  86. #HTTP2 & HTTP3 -> UPLOAD FIX -- END
  87.  
  88. #Caching for Static Files,
  89. location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|html|xml|otf|ttf|eot|woff|woff2|svg)$ {
  90. access_log off;
  91. expires 365d;
  92. add_header Cache-Control public;
  93. add_header Vary Accept-Encoding;
  94. tcp_nodelay off;
  95. open_file_cache max=3000 inactive=120s;
  96. open_file_cache_valid 45s;
  97. open_file_cache_min_uses 2;
  98. open_file_cache_errors off;
  99. gzip on;
  100. gzip_disable "msie6";
  101. gzip_vary on;
  102. gzip_proxied any;
  103. gzip_comp_level 6;
  104. gzip_buffers 16 8k;
  105. gzip_http_version 1.1;
  106. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript image/svg+xml;
  107. }
  108.  
  109. }
  110. }
  111.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement