#SSL Cert Nginx

6 messages · Page 1 of 1 (latest)

fading stag
#
server {
    set $homepath "/home/blop";
      server_name thenameless.gg;
  listen 443;
  listen [::]:443;
  ssl_certificate /etc/letsencrypt/live/thenameless.gg/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/thenameless.gg/privkey.pem;

    client_max_body_size 4G;
    keepalive_timeout 50;
    # access_log  /home/blop/logs/access.log; # you can place this wherever you want just uncomment
    # error_log   /home/blop/logs/errors.log;

    location /api {
        include proxy_params;
        proxy_pass http://127.0.0.1:8080;
        # proxy_pass http://unix:$homepath/server/socket.sock;
    }
    root $homepath/client/dist; # this is for your react but its not complete
    index index.html;

    charset utf-8;
    location / {
        try_files $uri $uri/ /index.html;
    }
}

server {
  listen 80 default_server;
  listen [::]:80 default_server;
  server_name thenameless.gg;
  return 301 https://$host$request_uri; # redirect unsecured requests
}