Advertisement
Guest User

Untitled

a guest
Feb 6th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.00 KB | None | 0 0
  1. server {
  2.         listen 443 ssl http2;
  3.         listen [::]:443 ssl http2;
  4.  
  5.         server_name server_name;
  6.         root /var/www/fight;
  7.  
  8.         # SSL
  9.         ssl_certificate /etc/letsencrypt/live/fight.getgain.ru/fullchain.pem;
  10.         ssl_certificate_key /etc/letsencrypt/live/fight.getgain.ru/privkey.pem;
  11.         ssl_trusted_certificate /etc/letsencrypt/live/fight.getgain.ru/chain.pem;
  12.  
  13.         # security
  14.         include nginxconfig.io/security.conf;
  15.         location /static {
  16.                 root /var/www/fight/;
  17.         }
  18.         # reverse proxy
  19.         location / {
  20.                 proxy_pass http://127.0.0.1:8010;
  21.                 include nginxconfig.io/proxy.conf;
  22.         }
  23.        
  24.         # additional config
  25.         include nginxconfig.io/general.conf;
  26. }
  27.  
  28. # HTTP redirect
  29. server {
  30.         listen 80;
  31.         listen [::]:80;
  32.  
  33.         server_name server_name;
  34.  
  35.         include nginxconfig.io/letsencrypt.conf;
  36.  
  37.         location / {
  38.                 return 301 https://server_name$request_uri;
  39.         }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement