From acd3f56e4dab3e8fed5dd68975ee6e2c12f9a49b Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 17 May 2021 20:35:50 +0200 Subject: [PATCH] Add certbot. Fix nginx config. --- arch-config/Dokumente/notes/zabbix-container-debian-11.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch-config/Dokumente/notes/zabbix-container-debian-11.md b/arch-config/Dokumente/notes/zabbix-container-debian-11.md index ac2d2be8..9880fdc1 100644 --- a/arch-config/Dokumente/notes/zabbix-container-debian-11.md +++ b/arch-config/Dokumente/notes/zabbix-container-debian-11.md @@ -71,7 +71,7 @@ Copy `service_discovery_blacklist` or `service_discovery_whitelist` to `/etc/zab `# systemctl restart zabbix-agent` Install proxy in front of zabbix -`# apt install nginx` +`# apt install nginx certbot python3-certbot-nginx` `# vim /etc/nginx/sites-available/zabbix.conf` ``` @@ -84,7 +84,7 @@ server { add_header X-Content-Type-Options "nosniff"; location = / { - return 302 https://$host/web/; + return 302 https://$host/index.php; } location / { @@ -119,3 +119,6 @@ server { `# ln -s /etc/nginx/sites-available/zabbix.conf /etc/nginx/sites-enabled/` `# systemctl restart nginx` + +*You need to run the site in http mode first for certbot to work!* +`# certbot certonly --nginx --agree-tos --redirect --hsts --staple-ocsp --email (email) -d (domain1),(domain2)`