From 579d880e9921a87133d11cb15285c7f39db83260 Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Sat, 6 Jan 2024 19:25:23 +0000 Subject: Make ip.ilvokhin.com a role --- roles/ip/files/ip.ilvokhin.com | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 roles/ip/files/ip.ilvokhin.com (limited to 'roles/ip/files/ip.ilvokhin.com') diff --git a/roles/ip/files/ip.ilvokhin.com b/roles/ip/files/ip.ilvokhin.com new file mode 100644 index 0000000..0555c67 --- /dev/null +++ b/roles/ip/files/ip.ilvokhin.com @@ -0,0 +1,28 @@ +server { + server_name ip.ilvokhin.com www.ip.ilvokhin.com; + + location / { + default_type text/plain; + return 200 $remote_addr\n; + } + + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/ip.ilvokhin.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/ip.ilvokhin.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; +} + +# Do not redirect to https to get a plain output for `curl ip.ilvokhin.com` +# command. +server { + server_name ip.ilvokhin.com www.ip.ilvokhin.com; + + location / { + default_type text/plain; + return 200 $remote_addr\n; + } + + listen 80; + listen [::]:80; +} -- cgit v1.2.3-70-g09d2