Coder Social home page Coder Social logo

nginx container won't start: "real_ip_header" directive is duplicate in /etc/nginx/conf.d/default.conf:142 about btcpayserver-docker HOT 8 CLOSED

orfeas0 avatar orfeas0 commented on June 17, 2024
nginx container won't start: "real_ip_header" directive is duplicate in /etc/nginx/conf.d/default.conf:142

from btcpayserver-docker.

Comments (8)

dennisreimann avatar dennisreimann commented on June 17, 2024

Can you check that you've configured Cloudflare correctly? The Cloudflare fragemnt is the only occurrence that would lead to this and we haven't seen reports like this before. https://docs.btcpayserver.org/Docker/cloudflare-tunnel/#how-to-use

from btcpayserver-docker.

orfeas0 avatar orfeas0 commented on June 17, 2024

I don't use Cloudflare at all.

from btcpayserver-docker.

dennisreimann avatar dennisreimann commented on June 17, 2024

Can you check that BTCPAYGEN_ADDITIONAL_FRAGMENTS doesn't contain the Cloudflare fragment?

echo $BTCPAYGEN_ADDITIONAL_FRAGMENTS

from btcpayserver-docker.

orfeas0 avatar orfeas0 commented on June 17, 2024

It doesn't contain cloudflare.

I think it's related to lnd-rest

{{ if $container.Env.REAL_IP_HEADER }}
{{ range $containerNetwork := $container.Networks }}
set_real_ip_from {{ $containerNetwork.IP }};
{{ end }}

This snippet generates multiple real_ip_header directives and it breaks nginx.
I removed it and it works fine.
I haven't made a PR because I don't know the implications of removing this.

from btcpayserver-docker.

dennisreimann avatar dennisreimann commented on June 17, 2024

@NicolasDorier can you shina a light on what might be going on here? The search across all our repos only yields the Cloudflare fragment as defining REAL_IP_HEADER -> https://github.com/search?q=org%3Abtcpayserver+REAL_IP_HEADER&type=code

from btcpayserver-docker.

NicolasDorier avatar NicolasDorier commented on June 17, 2024

sorry about this, I have clightning or lnd, and not experiencign the issue. This is weird..

from btcpayserver-docker.

NicolasDorier avatar NicolasDorier commented on June 17, 2024

@orfeas0 can you share all your nginx?

from btcpayserver-docker.

NicolasDorier avatar NicolasDorier commented on June 17, 2024

@orfeas0 I couldn't find the root cause of your issue, nothing we did have REAL_IP_HEADER set to X-Real-IP. That said, The PR #862 will fix your specific issue.

from btcpayserver-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.