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. Support
  3. X-Forwarded-For Header

X-Forwarded-For Header

Scheduled Pinned Locked Moved Solved Support
nginxreverseproxy
7 Posts 4 Posters 1.6k Views 5 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.
    • M Offline
      M Offline
      Mastadamus
      wrote on last edited by girish
      #1

      I have a NGINX reverse proxy in front of Cloudron due to the fact I have multiple VM's to proxy to and only one Public IP. Everything is working correctly. I am using NGINX proxy manager. I can visit all my Cloudron sites. My only problem is this.. In the NGINX logs on my Cloudron box, it shows the source IP of traffic as the internal IP address of my external NGINX Proxy manager. Nginx proxy manager should be configured for x-forwarded for headers but it seems like the NGINX on the cloudron box isn't using the x-forwarded for header as the source. Do you guys have any idea why or how to fix it?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mastadamus
        wrote on last edited by
        #2

        Nevermind I fixed it by doing the following.

        1. Added this configuration to the HTTP{} section of the nginx.conf file in /etc/nginx/nginx.conf

        log_format main '$http_x_forwarded_for - $remote_user [$time_local] '
        '"$request" $status $body_bytes_sent "$http_referer" '
        '"$http_user_agent"' ;

        access_log /var/log/nginx/access.log main;

        1 Reply Last reply
        0
        • mehdiM Offline
          mehdiM Offline
          mehdi
          App Dev
          wrote on last edited by
          #3

          @Mastadamus This will probably be lost at each cloudron update, be aware

          1 Reply Last reply
          1
          • girishG girish marked this topic as a question on
          • girishG girish has marked this topic as solved on
          • robiR Offline
            robiR Offline
            robi
            wrote on last edited by robi
            #4

            @girish should this be added as default for Cloudron?

            Conscious tech

            girishG 1 Reply Last reply
            0
            • robiR robi

              @girish should this be added as default for Cloudron?

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

              @robi this is set for app but not for the dashboard itself which OP was trying to fix. I think we have to add it to dashboard's nginx config when we look into supporting reverse proxy setups properly.

              M 1 Reply Last reply
              1
              • girishG girish

                @robi this is set for app but not for the dashboard itself which OP was trying to fix. I think we have to add it to dashboard's nginx config when we look into supporting reverse proxy setups properly.

                M Offline
                M Offline
                Mastadamus
                wrote on last edited by
                #6

                @girish Any update on support reverse proxy or adding this logging config as default?

                girishG 1 Reply Last reply
                0
                • M Mastadamus

                  @girish Any update on support reverse proxy or adding this logging config as default?

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

                  @Mastadamus yes, reverse proxy is implemented in next release (7.3) - https://forum.cloudron.io/topic/6655/what-s-coming-in-7-3/21

                  1 Reply Last reply
                  0
                  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