From 32b816c77b3951945606917121a0bdbf49187d07 Mon Sep 17 00:00:00 2001 From: Erik Stambaugh Date: Sun, 28 Jan 2024 15:45:21 -0800 Subject: [PATCH] Add connectivity to localhost for the domain --- ansible/roles/common/tasks/main.yaml | 2 +- ansible/roles/mastodon/templates/nginx.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ansible/roles/common/tasks/main.yaml b/ansible/roles/common/tasks/main.yaml index 16341c9..5e9bec6 100644 --- a/ansible/roles/common/tasks/main.yaml +++ b/ansible/roles/common/tasks/main.yaml @@ -13,7 +13,7 @@ lineinfile: path: /etc/hosts regexp: "^127.0.0.1" - line: "127.0.0.1 {{ hostname }} localhost" + line: "127.0.0.1 {{ hostname }} localhost {{ domain }}" - name: Set timezone file: diff --git a/ansible/roles/mastodon/templates/nginx.conf b/ansible/roles/mastodon/templates/nginx.conf index 12cd3fa..d5862bd 100644 --- a/ansible/roles/mastodon/templates/nginx.conf +++ b/ansible/roles/mastodon/templates/nginx.conf @@ -34,6 +34,8 @@ server { listen [::]:8448 ssl http2 default_server; allow {{ my_ip }}/32; + allow 127.0.0.1/32; + allow 172.18.0.0/16; deny all; # ssl_trusted_certificate /etc/letsencrypt/live/{{ domain_name }}/chain.pem;