Guest User

Nginx config

a guest
Feb 28th, 2022
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.77 KB | None | 0 0
  1. server {
  2.          root /var/www/test;
  3.  
  4.          listen 80;
  5.          listen [::]:80;
  6.          server_name fabrykacraft.pl;
  7.  
  8.          location / {
  9.           # proxy_pass http://fabrykacraft.pl:5000;
  10.           # proxy_pass http://76.76.21.21;
  11.           # proxy_pass https://vercel.fabrykacraft.pl;
  12.            proxy_pass http://localhost:5000;
  13.            proxy_http_version 1.1;
  14.            proxy_set_header Upgrade $http_upgrade;
  15.            proxy_set_header Connection 'upgrade';
  16.            proxy_set_header Host $host;
  17.            proxy_cache_bypass $http_upgrade;
  18.          }
  19.  
  20.  
  21.          #location / {
  22.          #    root /var/www/test;
  23.          #    try_files $uri $uri/ /index.html?$args;
  24.          #}
  25.  
  26.  
  27.          location /test/ {
  28.              root /var/www/test/test;
  29.              try_files $uri $uri/ /index.html?$args;
  30.          }
  31.  
  32.  
  33.          location ^~ '/.well-known/acme-challenge' {
  34.              allow all;
  35.          }
  36.  
  37.  
  38.  
  39.     listen 443 ssl; # managed by Certbot
  40.     ssl_certificate /etc/letsencrypt/live/fabrykacraft.pl/fullchain.pem; # managed by Certbot
  41.     ssl_certificate_key /etc/letsencrypt/live/fabrykacraft.pl/privkey.pem; # managed by Certbot
  42.     include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  43.     ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  44.  
  45.  
  46.  
  47.  
  48. }
  49.  
  50. server {
  51.     if ($host = fabrykacraft.pl) {
  52.         return 301 https://$host$request_uri;
  53.     } # managed by Certbot
  54.  
  55.  
  56.  
  57.          server_name fabrykacraft.pl;
  58.     listen 80;
  59.     return 404; # managed by Certbot
  60.  
  61.  
  62. }
  63.  
  64. server {
  65.     if ($host = fabrykacraft.pl) {
  66.         return 301 https://$host$request_uri;
  67.     } # managed by Certbot
  68.  
  69.  
  70.          listen 80;
  71.          server_name fabrykacraft.pl;
  72.     return 404; # managed by Certbot
  73.  
  74.  
  75. }
  76.  
Advertisement
Add Comment
Please, Sign In to add comment