Revize 7e702507
Přidáno uživatelem Tomáš Ballák před téměř 5 roky(ů)
docker/nginx/sites/default.conf | ||
---|---|---|
6 | 6 |
# Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response. |
7 | 7 |
return 301 https://$server_name$request_uri; |
8 | 8 |
} |
9 |
server { |
|
10 |
listen 443 ssl; |
|
11 |
listen [::]:443 ssl; |
|
12 |
ssl_certificate /certificate/cert.pem; |
|
13 |
ssl_certificate_key /certificate/key.pem; |
|
14 |
server_name www.heatmap.zcu.cz; |
|
15 |
|
|
16 |
return 301 https://heatmap.zcu.cz$request_uri; |
|
17 |
} |
|
18 | 9 |
server { |
19 | 10 |
listen 443 ssl; |
20 | 11 |
listen [::]:443 ssl; |
21 | 12 |
|
22 |
server_name heatmap.zcu.cz; |
|
13 |
server_name heatmap.zcu.cz www.heatmap.zcu.cz;
|
|
23 | 14 |
ssl_certificate /certificate/cert.pem; |
24 | 15 |
ssl_certificate_key /certificate/key.pem; |
25 | 16 |
|
scripts/renew_certificate.sh | ||
---|---|---|
7 | 7 |
docker-compose exec nginx /bin/sh -c " |
8 | 8 |
cd /root/.acme.sh; \ |
9 | 9 |
bash acme.sh --issue -d heatmap.zcu.cz --nginx /etc/nginx/sites-available/default.conf --debug 2; \ |
10 |
bash acme.sh --installcert -d heatmap.zcu.cz \ |
|
10 |
bash acme.sh --installcert -d heatmap.zcu.cz -d www.heatmap.zcu.cz\
|
|
11 | 11 |
--key-file /certificate/key.pem \ |
12 | 12 |
--fullchain-file /certificate/cert.pem \ |
13 | 13 |
--reloadcmd 'bash /etc/init.d/nginx reload'; |
Také k dispozici: Unified diff
preparation for new cert