Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • 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 (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Gitea
  3. Only internal IP address in logs

Only internal IP address in logs

Scheduled Pinned Locked Moved Solved Gitea
reverseproxy
6 Posts 4 Posters 11.5k Views 3 Watching
  • 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.
  • yusfY Offline
    yusfY Offline
    yusf
    wrote on last edited by girish
    #1

    In my app logs, I'm only presented with Docker's internal IP addresses, such as 172.18.0.1 and not ever end users' IPs. This poses various problems for me in maintaining app instances. I know this to be the issue with at least Matrix and Gitea.

    Can this be solved so that real external IPs are shown?

    murgeroM 1 Reply Last reply
    1
    • yusfY yusf

      In my app logs, I'm only presented with Docker's internal IP addresses, such as 172.18.0.1 and not ever end users' IPs. This poses various problems for me in maintaining app instances. I know this to be the issue with at least Matrix and Gitea.

      Can this be solved so that real external IPs are shown?

      murgeroM Offline
      murgeroM Offline
      murgero
      App Dev
      wrote on last edited by
      #2

      @yusf The external ips may be in the cloudron proxy logs on the host itself.

      --
      https://urgero.org
      ~ Professional Nerd. Freelance Programmer. ~

      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #3

        For the app behind the proxy, the reverse proxy sets various headers to preserve that info: https://git.cloudron.io/cloudron/box/-/blob/master/src/nginxconfig.ejs#L153

        See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For

        1 Reply Last reply
        0
        • nebulonN nebulon marked this topic as a question on
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          If you use apache in your app, you can put something like this in the config:

              LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
              CustomLog "|/bin/cat" proxy
              ErrorLog "|/bin/cat"
          
          1 Reply Last reply
          0
          • girishG girish has marked this topic as solved on
          • yusfY yusf has marked this topic as unsolved on
          • yusfY Offline
            yusfY Offline
            yusf
            wrote on last edited by
            #5

            This is not a custom app, this is Gitea.

            girishG 1 Reply Last reply
            1
            • girishG girish moved this topic from Support on
            • yusfY yusf

              This is not a custom app, this is Gitea.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @yusf thanks, fixed in latest package.

              1 Reply Last reply
              2
              • girishG girish has marked this topic as solved on
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search