SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

HTTPS.md (1104B)


      1 ## Using a Subdomain with nginx & certbot (HTTPS)
      2 Embedded iframes are easy if your site only uses HTTP. But if your site uses HTTPS, then you can likely see your donation button at `http://YOUR_SERVER_IP:8000/` but not in the embeded iframe. It is best that we create a new subdomain like `satsale.yoursite.com` from which we can serve payments. If you use nginx, you can create a new file `/etc/nginx/sites-enabled/satsale`:
      3 ```
      4 server {
      5     listen 80;
      6     server_name satsale.YOURWEBSITE.com;
      7 
      8     location / {
      9         proxy_pass http://localhost:8000;
     10 	proxy_http_version 1.1;
     11         proxy_set_header Upgrade $http_upgrade;
     12         proxy_set_header Connection "upgrade";
     13         proxy_set_header Host $host;
     14     }
     15 }
     16 ```
     17 we can now point our domain `satsale.YOURWEBSITE.com` DNS to our server IP and create HTTPS certificates by runnining the `certbot` command (or whatever else you use).
     18 
     19 You could also try provide Gunicorn with your website's HTTPS certificate with the flags `--certfile=cert.pem --keyfile=key.key`. If you use certbot for SSL, your keys are probably in `/etc/letsencrypt/live/`.