# Nginx not listen on IPv6 if not use HTTPS

**URL:** <https://meta.discourse.org/t/nginx-not-listen-on-ipv6-if-not-use-https/228050>\
**Category:** Self-hosting\
**Created:** [May 25, 2022, 7:40am UTC](https://meta.discourse.org/t/nginx-not-listen-on-ipv6-if-not-use-https/228050 "2022-05-25T07:40:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![topological](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@topological](https://meta.discourse.org/u/topological)\
**Post date:** [May 25, 2022, 7:40am UTC](https://meta.discourse.org/t/nginx-not-listen-on-ipv6-if-not-use-https/228050/1 "2022-05-25T07:40:28Z")

</div>

I set up a test server in an internal network (cannot be reached from outside, so cannot set up let’s encrypt), and I found that the nginx does not listen on IPv6 when the server has an IPv6 address. The `/etc/nginx/conf.d/discourse.conf` inside container shows `listen 80;` but no `listen [::]:80;`.

I have another production server which can be reached on IPv6 normally. And I have searched meta to find what is wrong with my test server configuration. Finally, I find that only if I add `web.letsencrypt.ssl.template.yml` and `web.ssl.template.yml` to my `app.yml` can I use IPv6 normally. The reason is that these files add `listen [::]:80;`. and `listen [::]:443 ssl http2;` in nginx configuration file.

The team can add IPv6 support to non-HTTPS install, i.e., add `listen [::]:80;` to `web.template.yml`.

---

_[View the full topic](https://meta.discourse.org/t/nginx-not-listen-on-ipv6-if-not-use-https/228050)._
