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

    Nginx not re-directing to host

    Scheduled Pinned Locked Moved IT Discussion
    26 Posts 6 Posters 4.6k 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.
    • wirestyle22W
      wirestyle22
      last edited by wirestyle22

      Following @JaredBusch's guide here: https://mangolassi.it/topic/16651/install-nginx-as-a-reverse-proxy-on-fedora-27

      Port Forwading (For Testing) -- This is forwarding to my Nginx VM.
      0_1520752596436_nginx1.PNG

      Google Domains DNS Settings:
      0_1520752130341_nginx2.PNG

      0_1520752133895_nginx3.PNG

      nc.skynetli.com

      0_1520752309723_nginx4.png

      #contents of /etc/nginx/conf.d/nc.skynetli.com.conf

      0_1520752418182_nginx5.png

      All .conf files should be read as per the nginx.conf file. Specifically this:
      0_1520752859562_nginx6.png

      I'm sure there is some detail I am not seeing as to why the nginx server is not re-directing to the nextcloud server. Any help is greatly appreciated.

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

        @wirestyle22 remove the comment in front of ssl stapling and then nginx -t. That should break it and let you see an error related to the conf file.

        Assuming it does, then you know the file is being parsed

        wirestyle22W 1 Reply Last reply Reply Quote 2
        • wirestyle22W
          wirestyle22 @JaredBusch
          last edited by wirestyle22

          @jaredbusch

          No error

          [root@nginx conf.d]# nginx -t
          nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
          nginx: configuration file /etc/nginx/nginx.conf test is successful
          

          0_1520790656567_nginx7.png

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

            @wirestyle22 said in Nginx not re-directing to host:

            @jaredbusch

            No error

            [root@nginx conf.d]# nginx -t
            nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
            nginx: configuration file /etc/nginx/nginx.conf test is successful
            

            0_1520790656567_nginx7.png

            Your conf.d folder is not being parsed.

            Why would be a really good question.

            wirestyle22W 1 Reply Last reply Reply Quote 1
            • wirestyle22W
              wirestyle22 @JaredBusch
              last edited by wirestyle22

              @jaredbusch Yeah but why? In my nginx.conf file it includes /etc/nginx/conf.d/*.conf;.

              Could a Syntax problem cause this?

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

                @wirestyle22 said in Nginx not re-directing to host:

                @jaredbusch Yeah but why? In my nginx.conf file it includes /etc/nginx/conf.d/*.conf;.

                Did you install new, or is this the same system you had problems with before?

                wirestyle22W 1 Reply Last reply Reply Quote 0
                • wirestyle22W
                  wirestyle22 @JaredBusch
                  last edited by wirestyle22

                  @jaredbusch New Fedora 27 Minimal but exact same issue. Has to be me.

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

                    @wirestyle22 So how did you configure Fedora?

                    Take it back to the stupid level to find what you are doing different.

                    Here are the screens for Fedora 25.
                    https://mangolassi.it/topic/13498/how-to-install-fedora-25-minimal

                    wirestyle22W 1 Reply Last reply Reply Quote 0
                    • wirestyle22W
                      wirestyle22 @JaredBusch
                      last edited by wirestyle22

                      @jaredbusch My installation is identical with the exception of guest agents. I can't imagine that would affect whether or not a .conf file was read though. This would all be self-contained, no?

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

                        @wirestyle22 said in Nginx not re-directing to host:

                        @jaredbusch My installation is identical with the exception of guest agents. I can't imagine that would affect whether or not a .conf file was read though. This would all be self-contained, no?

                        Should be of course. Your experience is abnormal. I set this up 3 times last night wile making these instructions.

                        1 Reply Last reply Reply Quote 2
                        • black3dynamiteB
                          black3dynamite
                          last edited by

                          Either your config messed up somewhere or SELinux is interfering.

                          wirestyle22W 1 Reply Last reply Reply Quote 0
                          • wirestyle22W
                            wirestyle22 @black3dynamite
                            last edited by

                            @black3dynamite said in Nginx not re-directing to host:

                            Either your config messed up somewhere or SELinux is interfering.

                            It should error if there a syntax problem though right? It should be reading any .conf in conf.d.

                            1 Reply Last reply Reply Quote 0
                            • wirestyle22W
                              wirestyle22
                              last edited by

                              sudo tail -5 /var/log/nginx/error.log

                              2018/03/11 23:42:31 [error] 681#0: *14 connect() failed (113: No route to host) while connecting to upstream, client: 192.168.1.1, server: nc.skynetli.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://192.168.1.202:80/favicon.ico", host: "nc.skynetli.com", referrer: "http://nc.skynetli.com/"

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

                                @wirestyle22 ok, so your proxy cannot talk to your backend server is seems.

                                So a networking issue.

                                Can you ping 192.168.1.202 from your proxy?
                                Can you SSH into it from your proxy?

                                wirestyle22W 1 Reply Last reply Reply Quote 1
                                • wirestyle22W
                                  wirestyle22 @JaredBusch
                                  last edited by wirestyle22

                                  @jaredbusch I can do both

                                  0_1520832485671_2.png

                                  0_1520832478759_1.png

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

                                    @wirestyle22 said in Nginx not re-directing to host:

                                    failed (113: No route to host) while connecting to upstream

                                    I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.

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

                                      @dbeato said in Nginx not re-directing to host:

                                      @wirestyle22 said in Nginx not re-directing to host:

                                      failed (113: No route to host) while connecting to upstream

                                      I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.

                                      Unsure where to really look config-wise to resolve it. From what I see, everything is correct

                                      dbeatoD 1 Reply Last reply Reply Quote 0
                                      • coliverC
                                        coliver
                                        last edited by

                                        What ports see you using to communicate with the upstream server?

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

                                          @wirestyle22 said in Nginx not re-directing to host:

                                          @dbeato said in Nginx not re-directing to host:

                                          @wirestyle22 said in Nginx not re-directing to host:

                                          failed (113: No route to host) while connecting to upstream

                                          I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.

                                          Unsure where to really look config-wise to resolve it. From what I see, everything is correct

                                          I usually try to setup the port on the configuration:

                                          proxy_Pass http://192.168.1.202:80;
                                          wirestyle22W 1 Reply Last reply Reply Quote 0
                                          • wirestyle22W
                                            wirestyle22 @dbeato
                                            last edited by wirestyle22

                                            @dbeato said in Nginx not re-directing to host:

                                            @wirestyle22 said in Nginx not re-directing to host:

                                            @dbeato said in Nginx not re-directing to host:

                                            @wirestyle22 said in Nginx not re-directing to host:

                                            failed (113: No route to host) while connecting to upstream

                                            I am seeing a 502 bad gateway on your link. Which obviously point to that upstream issue.

                                            Unsure where to really look config-wise to resolve it. From what I see, everything is correct

                                            I usually try to setup the port on the configuration:

                                            proxy_Pass http://192.168.1.202:80;
                                            

                                            I noticed that JB didn't specify the port in his most recent guide but did in his original guide (was port 80). I tried both ways with the same result.

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