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

    Install Nginx as a Reverse Proxy on Fedora 27

    IT Discussion
    nginx fedora certbot fedora 27 reverse proxy guides real instructions how to
    16
    107
    23.3k
    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.
    • D
      Donahue @JaredBusch
      last edited by

      @JaredBusch said in Install Nginx as a Reverse Proxy on Fedora 27:

      client_max_body_size 40M;
      

      One thing I just ran into was having to up this limit to be able to sync larger files. I would suggest flagging that in the first post so someone like me would know to change this if they work with larger files. I set mine to 16G. For some reason, this only effected the NC sync client, the browser upload as increased by other means.

      1 Reply Last reply Reply Quote 1
      • B
        brandon220
        last edited by

        Trying to get this to work tonight. The nextcloud.conf is copied on the Nginx server. I changed the server_name and the proxy_pass. Everything else is unchanged. When I run the nginx-t to verify, it returns

        nginx: [emerg] invalid number of arguments in "proxy_set_header" directive in /etc/nginx/conf.d/nextcloud.conf:4
        nginx: configuration file /etc/nginx/nginx.conf test failed

        I have researched for a few hours and cannot "see" where the issue is. I am in need of some guidance.

        J 1 Reply Last reply Reply Quote 0
        • J
          JaredBusch @brandon220
          last edited by

          @brandon220 said in Install Nginx as a Reverse Proxy on Fedora 27:

          Trying to get this to work tonight. The nextcloud.conf is copied on the Nginx server. I changed the server_name and the proxy_pass. Everything else is unchanged. When I run the nginx-t to verify, it returns

          nginx: [emerg] invalid number of arguments in "proxy_set_header" directive in /etc/nginx/conf.d/nextcloud.conf:4
          nginx: configuration file /etc/nginx/nginx.conf test failed

          I have researched for a few hours and cannot "see" where the issue is. I am in need of some guidance.

          You likely missed a semicolon to close a line.

          B 1 Reply Last reply Reply Quote 0
          • B
            brandon220 @JaredBusch
            last edited by

            @JaredBusch I looked at the config till my eyes went cross and didn’t notice that. I’ll check again later and see. I looked at the logs and they don’t really give any clues.

            J 1 Reply Last reply Reply Quote 0
            • J
              JaredBusch @brandon220
              last edited by

              @brandon220 said in Install Nginx as a Reverse Proxy on Fedora 27:

              @JaredBusch I looked at the config till my eyes went cross and didn’t notice that. I’ll check again later and see. I looked at the logs and they don’t really give any clues.

              That error you posted tells you that. On that line you didn’t close it, so it thinks you next line is another parameter of the command.

              1 Reply Last reply Reply Quote 0
              • B
                brandon220
                last edited by

                The problem was the items such as $remote_addr did not copy at all. They were missing. The config passed. Did the certbot and all went fine. If I go to https://nc.domain.com the site loads properly. If I go to http://nc.domain.com the site redirects and loads fine. Both work and cert loads in browser. However, if I go to nc.domain.com, it returns a blank page and shows https://localhost in the browser. I have the fqdn set up on the NC server and the Nginx. Not sure where this is coming from.

                1 Reply Last reply Reply Quote 0
                • B
                  brandon220
                  last edited by brandon220

                  Another question:
                  When you access Nextcloud with https and the site check shows that everything passes

                  passed.PNG

                  But, when you place it behind Nginx, it "breaks"

                  fail.PNG

                  I am trying to understand what is happening behind the scenes to cause the error. Is anyone else seeing this happen on their instances?

                  J B 2 Replies Last reply Reply Quote 0
                  • J
                    JaredBusch @brandon220
                    last edited by

                    @brandon220 said in Install Nginx as a Reverse Proxy on Fedora 27:

                    Another question:
                    When you access Nextcloud with https and the site check shows that everything passes

                    passed.PNG

                    But, when you place it behind Nginx, it "breaks"

                    fail.PNG

                    I am trying to understand what is happening behind the scenes to cause the error. Is anyone else seeing this happen on their instances?

                    This is not broken. it is simply a warnign about something..

                    What do you mean broken?

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      brandon220 @JaredBusch
                      last edited by

                      @JaredBusch I should not have said "broken". It is not causing any issues that I can see. Just not sure what changes that makes it give the warning. Is this one to ignore?

                      J S 2 Replies Last reply Reply Quote 0
                      • J
                        JaredBusch @brandon220
                        last edited by

                        @brandon220 said in Install Nginx as a Reverse Proxy on Fedora 27:

                        @JaredBusch I should not have said "broken". It is not causing any issues that I can see. Just not sure what changes that makes it give the warning. Is this one to ignore?

                        Read the message.

                        It says that it does not see a configuration related to LetsEncrypt.

                        If you are using a proxy, the proxy handles the cert.

                        1 Reply Last reply Reply Quote 0
                        • S
                          scottalanmiller @brandon220
                          last edited by

                          @brandon220 said in Install Nginx as a Reverse Proxy on Fedora 27:

                          @JaredBusch I should not have said "broken". It is not causing any issues that I can see. Just not sure what changes that makes it give the warning. Is this one to ignore?

                          Purely a warning, and not really a good one. It doesn't apply to you, so that makes it a bad warning.

                          1 Reply Last reply Reply Quote 1
                          • B
                            black3dynamite @brandon220
                            last edited by

                            @brandon220 said in Install Nginx as a Reverse Proxy on Fedora 27:

                            Another question:
                            When you access Nextcloud with https and the site check shows that everything passes

                            passed.PNG

                            But, when you place it behind Nginx, it "breaks"

                            fail.PNG

                            I am trying to understand what is happening behind the scenes to cause the error. Is anyone else seeing this happen on their instances?

                            If you want to remove that warning, add the following in the server block

                            location = /.well-known/carddav {
                                  return 301 $scheme://$host/remote.php/dav;
                                }
                                location = /.well-known/caldav {
                                  return 301 $scheme://$host/remote.php/dav;
                                }
                            
                            1 Reply Last reply Reply Quote 2
                            • travisdh1T
                              travisdh1
                              last edited by

                              It's now 2/15/2024 with Fedora 39, and this is still working.

                              Just setup a new reverse proxy.

                              1 Reply Last reply Reply Quote 2
                              • 1
                              • 2
                              • 3
                              • 4
                              • 5
                              • 6
                              • 1 / 6
                              • First post
                                Last post