File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ services:
1818 - " 443:443"
1919 volumes :
2020 - /home/ubuntu/tinybite/nginx/default.conf:/etc/nginx/conf.d/default.conf
21- - /home/ubuntu/tinybite/data/certbot/conf :/etc/letsencrypt
21+ - /etc/letsencrypt :/etc/letsencrypt
2222 - /home/ubuntu/tinybite/data/certbot/www:/var/www/certbot
2323 restart : always
2424 network_mode : host
Original file line number Diff line number Diff line change @@ -7,8 +7,22 @@ server {
77 }
88
99 location / {
10- proxy_pass http://tinybite-api:8080;
10+ return 301 https://$host$request_uri;
11+ }
12+ }
13+
14+ server {
15+ listen 443 ssl;
16+ server_name tinybite.duckdns.org;
17+
18+ ssl_certificate /etc/letsencrypt/live/tinybite.duckdns.org/fullchain.pem;
19+ ssl_certificate_key /etc/letsencrypt/live/tinybite.duckdns.org/privkey.pem;
20+
21+ location / {
22+ proxy_pass http://localhost:8080;
1123 proxy_set_header Host $host;
1224 proxy_set_header X-Real-IP $remote_addr;
25+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26+ proxy_set_header X-Forwarded-Proto $scheme;
1327 }
1428}
You can’t perform that action at this time.
0 commit comments