Skip to content

Instantly share code, notes, and snippets.

@ravikyada
Created October 24, 2023 08:16
Show Gist options
  • Save ravikyada/dde9be0cc3549be5d4e398d670687cfd to your computer and use it in GitHub Desktop.
Save ravikyada/dde9be0cc3549be5d4e398d670687cfd to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name test.demo.in;
location / {
return 301 https://$host$request_uri;
}
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}
server {
listen 443 ssl;
server_name test.demo.in;
location / {
proxy_pass http://test.demo.in;
}
ssl_certificate /etc/letsencrypt/live/test.demo.in/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/test.demo.in/privkey.pem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment