FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    how to change port no. 9011 (fusionauth) to 80 or any port like 443 is it possible ????

    Scheduled Pinned Locked Moved
    Q&A
    2
    7
    3.1k
    Loading More Posts
    • 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.
    • C
      coolkumarsuman
      last edited by coolkumarsuman

      Re: Can't get by Maintenance Mode

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        Typically people proxy fusionauth using something like nginx or haproxy. That way the proxy can handle SSL termination and can run as root to listen to a port below 1024.

        Here are some community contributed configurations for those proxies.

        You can change the port number FusionAuth listens to by changing the fusionauth-app.http-port and fusionauth-app.https-port properties in your fusionauth config. However, if you run it on port 80/443, you'll need to start it as root. We recommend using a proxy instead of doing so.

        We also don't recommend running tomcat for SSL traffic, as outlined in this post: https://fusionauth.io/community/forum/topic/180/is-it-possible-to-set-up-ssl-for-fusionauth-directly

        HTH.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • C
          coolkumarsuman
          last edited by coolkumarsuman

          Thanks for reply

          It's working with nginx proxy

          but after credential submit showing this error (picture 3)❌
          1.png

          2.png

          3.png

          1 Reply Last reply Reply Quote 0
          • danD
            dan
            last edited by

            Hmm. I'm sorry, I can't provide much help troubleshooting nginx configurations, which is what this looks like. I've worked with it in the past, but it's been a while.

            I'd suggest setting up a basic tomcat server and making sure nginx can proxy that correctly. This removes fusionauth from the equation. Then, once that is running, you can switch it out and put FusionAuth in place.

            Also, here's the relevant section of my apache config (which also proxies FusionAuth) in case that is of any use:

            
            <VirtualHost *:443>
              ServerName local.fusionauth.io
              SSLEngine on
              SSLCertificateFile /etc/ssl/certs/fusionauth.io.crt
              SSLCertificateKeyFile /etc/ssl/private/fusionauth.io.key
              SSLCertificateChainFile /etc/ssl/certs/gd_bundle-g2-g1.crt
              RequestHeader unset Host
            
              RequestHeader set X-Forwarded-Proto "https"
              RequestHeader set X-Forwarded-Port "443"
              RequestHeader set X-Forwarded-Host "local.fusionauth.io"
              ProxyPass /.well-known !
              ProxyPass / http://localhost:9011/ retry=1
              ProxyPassReverse / http://localhost:9011/ retry=1
            </VirtualHost>
            

            Your last option is to purchase a support plan; this gets you access to the engineering team via support tickets. You can check pricing out here.

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            1 Reply Last reply Reply Quote 1
            • C
              coolkumarsuman
              last edited by coolkumarsuman

              Thanks
              Now I run fusionauth with SSL
              now I have an open site with SSL
              but I do not follow the above code

              now its work prefectly

              THANKS AGAIN Fusionauth team

              1 Reply Last reply Reply Quote 0
              • danD
                dan
                last edited by

                Great! Glad that everything is working now.

                Any chance you can share the code you did use to get it working so that other folks visiting the forum can benefit?

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                1 Reply Last reply Reply Quote 0
                • C
                  coolkumarsuman
                  last edited by

                  this section for localhost

                  server {

                  listen 80;
                  

                  server_name YOURSITENAME.COM;

                  location / {
                      proxy_pass http://127.0.0.1:9011;
                      proxy_set_header Host $host;
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header X-Forwarded-Proto $scheme;
                  }
                  

                  }
                  #######################################################################

                  this section for https (ssl)
                  server {
                  listen 443 ssl http2;
                  listen [::]:443 ssl http2;
                  server_name YOURSITENAME.COM;

                  location / {
                      proxy_pass http://127.0.0.1:9011;
                      proxy_set_header Host $host;
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header X-Forwarded-Proto $scheme;
                  }
                  

                  }

                  1 Reply Last reply Reply Quote 0
                  • mark.robustelliM mark.robustelli referenced this topic on
                  • mark.robustelliM mark.robustelli referenced this topic on
                  • mark.robustelliM mark.robustelli referenced this topic on
                  • mark.robustelliM mark.robustelli referenced this topic on
                  • First post
                    Last post