1
0
mirror of https://github.com/plausible/hosting.git synced 2025-06-17 11:17:29 -05:00

Instructs Nginx to listen on both IPv6 and IPv4

On a server which has IPv6 configured, `sudo certbot --nginx` would fail because certbot looks for both A and AAAA DNS records, and if AAAA (IPv6) is found it uses that. 

By adding:

```
listen 80;
listen [::]:80;
```

issue  is solved. Servers which have only IPv4 configured will continue working normally.
This commit is contained in:
Mario Bašić
2020-12-03 16:53:43 +01:00
committed by GitHub
parent ffdc473cf2
commit 9827f5ace7

@ -2,6 +2,9 @@ server {
# replace example.com with your domain name
server_name example.com;
listen 80;
listen [::]:80;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;