Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. (Boosts appreciated)Ok, I've seen some stuff that makes me question whether you can use a natively installed (so non-containerized) nginx to reverse proxy to docker apps?

(Boosts appreciated)Ok, I've seen some stuff that makes me question whether you can use a natively installed (so non-containerized) nginx to reverse proxy to docker apps?

Scheduled Pinned Locked Moved Uncategorized
8 Posts 3 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mothwaves@void.lgbtM This user is from outside of this forum
    mothwaves@void.lgbtM This user is from outside of this forum
    mothwaves@void.lgbt
    wrote last edited by
    #1
    (Boosts appreciated)

    Ok, I've seen some stuff that makes me question whether you can use a natively installed (so non-containerized) nginx to reverse proxy to docker apps? I've seen some people say you need to use nginx under docker for that but I don't understand why that would be the case. Can anyone clarify if this is possible or why if it isn't?

    I've also seen stuff about docker-gen and nginx-proxy-manager I still have to look at.
    monoidmusician@tech.lgbtM fd93@fosstodon.orgF 2 Replies Last reply
    1
    0
    • R relay@relay.mycrowd.ca shared this topic
    • mothwaves@void.lgbtM mothwaves@void.lgbt
      (Boosts appreciated)

      Ok, I've seen some stuff that makes me question whether you can use a natively installed (so non-containerized) nginx to reverse proxy to docker apps? I've seen some people say you need to use nginx under docker for that but I don't understand why that would be the case. Can anyone clarify if this is possible or why if it isn't?

      I've also seen stuff about docker-gen and nginx-proxy-manager I still have to look at.
      monoidmusician@tech.lgbtM This user is from outside of this forum
      monoidmusician@tech.lgbtM This user is from outside of this forum
      monoidmusician@tech.lgbt
      wrote last edited by
      #2

      @mothwaves I can't think of any reason why nginx would need to be containerized. the network setup may look different (if you aren't using host networking in docker), but it should just work

      mothwaves@void.lgbtM 1 Reply Last reply
      0
      • monoidmusician@tech.lgbtM monoidmusician@tech.lgbt

        @mothwaves I can't think of any reason why nginx would need to be containerized. the network setup may look different (if you aren't using host networking in docker), but it should just work

        mothwaves@void.lgbtM This user is from outside of this forum
        mothwaves@void.lgbtM This user is from outside of this forum
        mothwaves@void.lgbt
        wrote last edited by
        #3
        @monoidmusician Ok that's good to hear. Frankly all the information about nginx and my lack or knowledge in a lot of the spaces is making my head spin so im just glad to hear at least that it should be possible.
        monoidmusician@tech.lgbtM 1 Reply Last reply
        0
        • mothwaves@void.lgbtM mothwaves@void.lgbt
          @monoidmusician Ok that's good to hear. Frankly all the information about nginx and my lack or knowledge in a lot of the spaces is making my head spin so im just glad to hear at least that it should be possible.
          monoidmusician@tech.lgbtM This user is from outside of this forum
          monoidmusician@tech.lgbtM This user is from outside of this forum
          monoidmusician@tech.lgbt
          wrote last edited by
          #4

          @mothwaves yeah, i understand, i’ve had to go through it too

          monoidmusician@tech.lgbtM 1 Reply Last reply
          0
          • monoidmusician@tech.lgbtM monoidmusician@tech.lgbt

            @mothwaves yeah, i understand, i’ve had to go through it too

            monoidmusician@tech.lgbtM This user is from outside of this forum
            monoidmusician@tech.lgbtM This user is from outside of this forum
            monoidmusician@tech.lgbt
            wrote last edited by
            #5

            @mothwaves any URL that you can access locally on the server (outside of docker), nginx will be able to reverse proxy, since that’s basically what it does, just send the requests on.

            so if you can see the URL with curl or with a browser, it should be fine.

            the only real complication there is docker networking, where you need to explicitly list ports to expose and i think you might need to use a hostname other than localhost, but i’ve mostly used host networking (just make sure your firewall is set up to block incoming connections to the port, just allow nginx to access it locally)

            mothwaves@void.lgbtM 1 Reply Last reply
            0
            • mothwaves@void.lgbtM mothwaves@void.lgbt
              (Boosts appreciated)

              Ok, I've seen some stuff that makes me question whether you can use a natively installed (so non-containerized) nginx to reverse proxy to docker apps? I've seen some people say you need to use nginx under docker for that but I don't understand why that would be the case. Can anyone clarify if this is possible or why if it isn't?

              I've also seen stuff about docker-gen and nginx-proxy-manager I still have to look at.
              fd93@fosstodon.orgF This user is from outside of this forum
              fd93@fosstodon.orgF This user is from outside of this forum
              fd93@fosstodon.org
              wrote last edited by
              #6

              @mothwaves No reason this wouldn't work. It's a standard setup, you just setup nginx to reverse proxy from some domain to localhost port whatever. Then your docker containers should always bind to localhost for security reasons. Then finally configure nginx to proxy from your external interface to the localhost port, and you can slap TLS certs or whatever on top.

              I am lazy so I just use Caddy for this, easier to config.

              mothwaves@void.lgbtM 1 Reply Last reply
              0
              • fd93@fosstodon.orgF fd93@fosstodon.org

                @mothwaves No reason this wouldn't work. It's a standard setup, you just setup nginx to reverse proxy from some domain to localhost port whatever. Then your docker containers should always bind to localhost for security reasons. Then finally configure nginx to proxy from your external interface to the localhost port, and you can slap TLS certs or whatever on top.

                I am lazy so I just use Caddy for this, easier to config.

                mothwaves@void.lgbtM This user is from outside of this forum
                mothwaves@void.lgbtM This user is from outside of this forum
                mothwaves@void.lgbt
                wrote last edited by
                #7
                @fd93 Yeah, this is what I was trying to do but I must be missing/misunderstanding something about the networking. I'm not currently working with it but I'll give an update when I do work on it again.
                1 Reply Last reply
                1
                0
                • monoidmusician@tech.lgbtM monoidmusician@tech.lgbt

                  @mothwaves any URL that you can access locally on the server (outside of docker), nginx will be able to reverse proxy, since that’s basically what it does, just send the requests on.

                  so if you can see the URL with curl or with a browser, it should be fine.

                  the only real complication there is docker networking, where you need to explicitly list ports to expose and i think you might need to use a hostname other than localhost, but i’ve mostly used host networking (just make sure your firewall is set up to block incoming connections to the port, just allow nginx to access it locally)

                  mothwaves@void.lgbtM This user is from outside of this forum
                  mothwaves@void.lgbtM This user is from outside of this forum
                  mothwaves@void.lgbt
                  wrote last edited by
                  #8
                  @monoidmusician I'm probably overlooking something with the docker networking. I'll try looking into it further.
                  1 Reply Last reply
                  1
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups