author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 31 Jul 2023 00:29:30 +0300 | |
changeset 29 | 74c62c0d1f64 |
parent 28 | 47f47ba80e8d |
child 31 | 461eed8e7463 |
permissions | -rw-r--r-- |
28
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
mkdir /srv/www/letsencrypt |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
# service apache2 stop |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
# --standalone |
29
74c62c0d1f64
apache user is no longer used on Debian.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
28
diff
changeset
|
7 |
certbot certonly --webroot \ |
28
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
--agree-tos --non-interactive \ |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
-m gavenkoa@gmail.com \ |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
-w /srv/www/letsencrypt \ |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
--cert-name defun.work \ |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
-d 2048.defun.work |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
# service apache2 start |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
|
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
# https://wiki.debian.org/LetsEncrypt |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
# python3-certbot-apache - Apache plugin for Certbot |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
|
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
18 |
# systemctl reload apache2 |
47f47ba80e8d
Let's Encrypt webroot renewal method.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
19 |
# sudo certbot --apache --agree-tos --redirect -m youremail@email.com -d domainname.com -d www.domainname.com |