1. your domain
2. docker
./run.sh [yourdomain.com] [[email protected]]
now your certification located in ./certificates/live/[yourdomain.com]
- replace
[domain_here]
to your domain in./nginx-ssl/nginx/conf.d/default.conf
and specify tarrget to pass your web application
server {
listen 443 ssl;
server_name [domain_here];
ssl_certificate /etc/letsencrypt/live/[domain_here]/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/[domain_here]/privkey.pem;
location / {
proxy_pass http://[your application ip(private or public)];
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
- run
docker-conmpose.yml
innginx-ssl
directory
docker compose up -d
- just run
run.sh
script inrenew
directory with nginx container name
./run.sh [nginx container name]
curl https://yourdomain.com