according to https://medium.com/@pentacent/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71
25 lines
643 B
Plaintext
25 lines
643 B
Plaintext
server {
|
|
listen 80;
|
|
server_name ticket.simplificator.com;
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name ticket.simplificator.com;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/ticket.simplificator.com/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/ticket.simplificator.com/privkey.pem;
|
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
|
|
|
location / {
|
|
proxy_pass http://ticket.simplificator.com;
|
|
}
|
|
} |