ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Setting up Nginx on CentOS 7 as a reverse proxy

    Scheduled Pinned Locked Moved IT Discussion
    centos 7nginxreverse proxysetuphow to
    57 Posts 13 Posters 23.9k Views
    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.
    • JaredBuschJ
      JaredBusch @brandon220
      last edited by

      @brandon220 said in Setting up Nginx on CentOS 7 as a reverse proxy:

      Just an FYI - to get semanage to work on Fedora 27, I had to install policycoreutils-python-utils

      Yeah, I really need to write a new guide.

      1 Reply Last reply Reply Quote 0
      • A
        Alex Sage @wirestyle22
        last edited by Alex Sage

        @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

        As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

        I name mine subdomain.domain.tld.conf

        JaredBuschJ 1 Reply Last reply Reply Quote 0
        • JaredBuschJ
          JaredBusch @Alex Sage
          last edited by

          @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

          @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

          As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

          I name mine subdomain.domain.tld.conf

          Yeah, mine are the full thing with a .conf at the end.

          daerma.com.conf
          obelisk.daerma.com.conf
          
          wirestyle22W 1 Reply Last reply Reply Quote 0
          • wirestyle22W
            wirestyle22 @JaredBusch
            last edited by wirestyle22

            @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

            @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

            @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

            As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

            I name mine subdomain.domain.tld.conf

            Yeah, mine are the full thing with a .conf at the end.

            daerma.com.conf
            obelisk.daerma.com.conf
            

            Yeah, when I was writing I typed in the actual web address accidentally.

            nc.domain.com instead of nc.domain.conf or nc.domain.com.conf

            dbeatoD 1 Reply Last reply Reply Quote 0
            • dbeatoD
              dbeato @wirestyle22
              last edited by

              @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

              @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

              @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

              @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

              As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

              I name mine subdomain.domain.tld.conf

              Yeah, mine are the full thing with a .conf at the end.

              daerma.com.conf
              obelisk.daerma.com.conf
              

              Yeah, when I was writing I typed in the actual web address accidentally.

              nc.domain.com instead of nc.domain.conf or nc.domain.com.conf

              I did the same today, total facepalm.

              JaredBuschJ 1 Reply Last reply Reply Quote 1
              • JaredBuschJ
                JaredBusch @dbeato
                last edited by JaredBusch

                @dbeato said in Setting up Nginx on CentOS 7 as a reverse proxy:

                @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

                @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

                I name mine subdomain.domain.tld.conf

                Yeah, mine are the full thing with a .conf at the end.

                daerma.com.conf
                obelisk.daerma.com.conf
                

                Yeah, when I was writing I typed in the actual web address accidentally.

                nc.domain.com instead of nc.domain.conf or nc.domain.com.conf

                I did the same today, total facepalm.

                You can name them whatever you want. I just personally like this format.

                dbeatoD 1 Reply Last reply Reply Quote 0
                • dbeatoD
                  dbeato @JaredBusch
                  last edited by

                  @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                  @dbeato said in Setting up Nginx on CentOS 7 as a reverse proxy:

                  @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                  @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                  @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

                  @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                  As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

                  I name mine subdomain.domain.tld.conf

                  Yeah, mine are the full thing with a .conf at the end.

                  daerma.com.conf
                  obelisk.daerma.com.conf
                  

                  Yeah, when I was writing I typed in the actual web address accidentally.

                  nc.domain.com instead of nc.domain.conf or nc.domain.com.conf

                  I did the same today, total facepalm.

                  You can name them whatever you want. I just personally like this format.

                  Well, yeah but the configuration looks for all *.conf files which failed on loading the site at first.

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @dbeato
                    last edited by

                    @dbeato said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    @dbeato said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                    As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

                    I name mine subdomain.domain.tld.conf

                    Yeah, mine are the full thing with a .conf at the end.

                    daerma.com.conf
                    obelisk.daerma.com.conf
                    

                    Yeah, when I was writing I typed in the actual web address accidentally.

                    nc.domain.com instead of nc.domain.conf or nc.domain.com.conf

                    I did the same today, total facepalm.

                    You can name them whatever you want. I just personally like this format.

                    Well, yeah but the configuration looks for all *.conf files which failed on loading the site at first.

                    Right, you can name it wtf.conf if you want is what I mean.I just personally like the fqdn.conf structure, so that is how I wrote the guide.

                    dbeatoD 1 Reply Last reply Reply Quote 1
                    • dbeatoD
                      dbeato @JaredBusch
                      last edited by

                      @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @dbeato said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @dbeato said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @jaredbusch said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @aaronstuder said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      @wirestyle22 said in Setting up Nginx on CentOS 7 as a reverse proxy:

                      As JB said you would name them your subdomain/domain name. subdomain.domain.conf <---not .com

                      I name mine subdomain.domain.tld.conf

                      Yeah, mine are the full thing with a .conf at the end.

                      daerma.com.conf
                      obelisk.daerma.com.conf
                      

                      Yeah, when I was writing I typed in the actual web address accidentally.

                      nc.domain.com instead of nc.domain.conf or nc.domain.com.conf

                      I did the same today, total facepalm.

                      You can name them whatever you want. I just personally like this format.

                      Well, yeah but the configuration looks for all *.conf files which failed on loading the site at first.

                      Right, you can name it wtf.conf if you want is what I mean.I just personally like the fqdn.conf structure, so that is how I wrote the guide.

                      The guide was awesome and worked perfectly.

                      1 Reply Last reply Reply Quote 3
                      • Z
                        zenbu @JaredBusch
                        last edited by

                        @JaredBusch I setup a reverse proxy with nginx for ScreenConnect, but the relay port isn't working. Can you provide your setup for how your relay is setup? Does it require two different IPs?

                        F scottalanmillerS 2 Replies Last reply Reply Quote 0
                        • F
                          flaxking @zenbu
                          last edited by

                          @zenbu said in Setting up Nginx on CentOS 7 as a reverse proxy:

                          @JaredBusch I setup a reverse proxy with nginx for ScreenConnect, but the relay port isn't working. Can you provide your setup for how your relay is setup? Does it require two different IPs?

                          That's not HTTP traffic. You would have to set Nginx up for TCP/UDP load balancing

                          Z 1 Reply Last reply Reply Quote 1
                          • scottalanmillerS
                            scottalanmiller @zenbu
                            last edited by

                            @zenbu said in Setting up Nginx on CentOS 7 as a reverse proxy:

                            @JaredBusch I setup a reverse proxy with nginx for ScreenConnect, but the relay port isn't working. Can you provide your setup for how your relay is setup? Does it require two different IPs?

                            First, do you need a revere proxy for that? It's not web traffic. If you do, I'd recommend HA-Proxy.

                            Second, don't use CentOS 7 today. This guide is very old.

                            JaredBuschJ 2 Replies Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @scottalanmiller
                              last edited by JaredBusch

                              @scottalanmiller said in Setting up Nginx on CentOS 7 as a reverse proxy:

                              @zenbu said in Setting up Nginx on CentOS 7 as a reverse proxy:

                              @JaredBusch I setup a reverse proxy with nginx for ScreenConnect, but the relay port isn't working. Can you provide your setup for how your relay is setup? Does it require two different IPs?

                              First, do you need a revere proxy for that? It's not web traffic. If you do, I'd recommend HA-Proxy.

                              Right, you port forward the relay traffic. It is encrypted by the clients on each end. You SSL certificates do not apply to it anyway.

                              1 Reply Last reply Reply Quote 0
                              • JaredBuschJ
                                JaredBusch @scottalanmiller
                                last edited by

                                @scottalanmiller said in Setting up Nginx on CentOS 7 as a reverse proxy:

                                Second, don't use CentOS 7 today. This guide is very old.

                                Well the new guide is old already too. But at least it is still the same on Fedora 31 as it was on Fedora 27...

                                https://www.mangolassi.it/topic/16651/install-nginx-as-a-reverse-proxy-on-fedora-27

                                1 Reply Last reply Reply Quote 3
                                • Z
                                  zenbu @flaxking
                                  last edited by

                                  @flaxking Good point, I found out about that and have been reading up on it. Using ngx_stream_ssl_preread_module seems like it may be the solution. It will let you differentiate between HTTP SSL traffics and non HTTP ssl traffic. That way I'm hoping to use port 443 for both the web portal and the ScreenConnect relay.

                                  scottalanmillerS 2 Replies Last reply Reply Quote 0
                                  • scottalanmillerS
                                    scottalanmiller @zenbu
                                    last edited by

                                    @zenbu said in Setting up Nginx on CentOS 7 as a reverse proxy:

                                    That way I'm hoping to use port 443 for both the web portal and the ScreenConnect relay.

                                    I don't believe that there is any possible way to do that. Because you'd need a host header or something to differentiate and SC doesn't work that way.

                                    The traffic is designed to be on different ports. They can be any ports that you want, but not the same one.

                                    1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @zenbu
                                      last edited by

                                      @zenbu

                                      You have two issues... the first is what we call "being weird." This is a bizarre thing to be trying to do. It's not wrong, it's just "weird"... that kind of thing that hard to describe but it's clearly strange and trying to invent a wheel that already works really well.

                                      The second issue is your goal: what goal are you trying to accomplish by doing this? There's not normally any reason to have the proxy of the SC control port traffic. What problem are you trying to solve by doing this?

                                      JaredBuschJ 1 Reply Last reply Reply Quote 0
                                      • JaredBuschJ
                                        JaredBusch @scottalanmiller
                                        last edited by

                                        @scottalanmiller said in Setting up Nginx on CentOS 7 as a reverse proxy:

                                        What problem are you trying to solve by doing this?

                                        If I had to guess, outbound traffic controls blocking port 8041 (the default relay port).

                                        I run in to this sometimes.

                                        1 Reply Last reply Reply Quote 0
                                        • JaredBuschJ
                                          JaredBusch
                                          last edited by

                                          If the above is your problem, then you should look at a different solution. @scottalanmiller's current favorite is MeshCentral.

                                          It is not as good as ConnectWise Control yet, IMO, but close.

                                          1 Reply Last reply Reply Quote 1
                                          • 1
                                          • 2
                                          • 3
                                          • 3 / 3
                                          • First post
                                            Last post