masquitos

Untitled

Jun 10th, 2020
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 3.45 KB | None | 0 0
  1.  
  2. #user  nobody;
  3. worker_processes  1;
  4.  
  5. #error_log  logs/error.log;
  6. #error_log  logs/error.log  notice;
  7. #error_log  logs/error.log  info;
  8.  
  9. #pid        logs/nginx.pid;
  10.  
  11.  
  12. events {
  13.     worker_connections  1024;
  14. }
  15.  
  16.  
  17. http {
  18.     include       mime.types;
  19.     default_type  application/octet-stream;
  20.  
  21.     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
  22.     #                  '$status $body_bytes_sent "$http_referer" '
  23.     #                  '"$http_user_agent" "$http_x_forwarded_for"';
  24.  
  25.     #access_log  logs/access.log  main;
  26.  
  27.     sendfile        on;
  28.     #tcp_nopush     on;
  29.  
  30.     #keepalive_timeout  0;
  31.     keepalive_timeout  65;
  32.  
  33.     #gzip  on;
  34.  
  35.     server {
  36.         listen       80;
  37.         server_name  home;
  38.        
  39.        
  40.         # enable gzip compression
  41.  
  42. # Turns on/off the gzip compression.
  43. gzip on;
  44.  
  45. # Compression level (1-9).
  46. # 5 is a perfect compromise between size and cpu usage, offering about
  47. # 75% reduction for most ascii files (almost identical to level 9).
  48. gzip_comp_level    5;
  49.  
  50. # The minimum size file to compress the files.
  51. gzip_min_length  1100;
  52.  
  53. # Set the buffer size of gzip, 4 32k is good enough for almost everybody.
  54. gzip_buffers  4 32k;
  55.  
  56. # Compress data even for clients that are connecting to us via proxies,
  57. # identified by the "Via" header (required for CloudFront).
  58. gzip_proxied       any;
  59.  
  60. # This directive let you specify which file types should be compressed, in this case plain text, js files, xml and #css.
  61. gzip_types    text/plain application/x-javascript application/javascript text/xml text/css;
  62.  
  63. # Enables response header of β€œVary: Accept-Encoding
  64. gzip_vary on;
  65.  
  66. # end gzip configuration
  67.  
  68.         #charset koi8-r;
  69.  
  70.         #access_log  logs/host.access.log  main;
  71.  
  72.         location / {
  73.             root   html/landing;
  74.             index  index.html index.htm;
  75.         }
  76.  
  77.         location /lk {
  78.             alias   html/lk;
  79.             try_files $uri $uri/ /lk/index.html;
  80.         }
  81.        
  82.         location /public {
  83.             proxy_pass http://127.0.0.1:8881;
  84.             proxy_set_header Host $host;
  85.         }
  86.        
  87.         location /api {
  88.             proxy_pass http://127.0.0.1:8881;
  89.             proxy_set_header Host $host;
  90.         }
  91.        
  92.        
  93.         location /socket.io {
  94.             proxy_set_header Upgrade $http_upgrade;
  95.             proxy_set_header Connection "upgrade";
  96.             proxy_http_version 1.1;
  97.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  98.             proxy_set_header Host $host;
  99.             proxy_pass http://127.0.0.1:8881;
  100.             proxy_set_header Host $host;
  101.         }
  102.  
  103.  
  104.         #error_page  404              /404.html;
  105.  
  106.         # redirect server error pages to the static page /50x.html
  107.         #
  108.         error_page   500 502 503 504  /50x.html;
  109.         location = /50x.html {
  110.             root   html;
  111.         }
  112.  
  113.         # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  114.         #
  115.         #location ~ \.php$ {
  116.         #    proxy_pass   http://127.0.0.1;
  117.         #}
  118.  
  119.         # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  120.         #
  121.         #location ~ \.php$ {
  122.         #    root           html;
  123.         #    fastcgi_pass   127.0.0.1:9000;
  124.         #    fastcgi_index  index.php;
  125.         #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
  126.         #    include        fastcgi_params;
  127.         #}
  128.  
  129.         # deny access to .htaccess files, if Apache's document root
  130.         # concurs with nginx's one
  131.         #
  132.         #location ~ /\.ht {
  133.         #    deny  all;
  134.         #}
  135.     }
  136.  
  137.  
  138.  
  139.  
  140.     server {
  141.         listen       80;
  142.         server_name  demo.home;
  143.  
  144.         location / {
  145.             root   html/demo;
  146.             try_files $uri $uri/ /lk/index.html;
  147.         }
  148.     }
  149. }
Add Comment
Please, Sign In to add comment