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

    Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?

    IT Discussion
    pihole admin
    4
    15
    6.5k
    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 @travisdh1
      last edited by

      @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

      Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?

      I'm curious because mine isn't showing up right at all. It sits behind an nginx reverse proxy that was setup following @JaredBusch's instructions here, and I haven't had an issue like this with anything else.

      I never made instructions for this. I believe I commented that something similar should work though yes.

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

        @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

        Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?

        I'm curious because mine isn't showing up right at all. It sits behind an nginx reverse proxy that was setup following @JaredBusch's instructions here, and I haven't had an issue like this with anything else.

        Isn't because is loading HTTP Content?

        travisdh1T 1 Reply Last reply Reply Quote 0
        • travisdh1T
          travisdh1 @dbeato
          last edited by

          @dbeato said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

          @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

          Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?

          I'm curious because mine isn't showing up right at all. It sits behind an nginx reverse proxy that was setup following @JaredBusch's instructions here, and I haven't had an issue like this with anything else.

          Isn't because is loading HTTP Content?

          I've got lots of plain HTTP content loading on the back end of my reverse proxy, this is the only one that's given me any issue.

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

            @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

            @dbeato said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

            @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

            Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?

            I'm curious because mine isn't showing up right at all. It sits behind an nginx reverse proxy that was setup following @JaredBusch's instructions here, and I haven't had an issue like this with anything else.

            Isn't because is loading HTTP Content?

            I've got lots of plain HTTP content loading on the back end of my reverse proxy, this is the only one that's given me any issue.

            Well I meant like after the fact showing a couple of URLs on http, I know the purpose of the Proxy (After all that's the purpose). What errors or issue you see?

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

              This might help.
              https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

              https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

              travisdh1T dbeatoD 4 Replies Last reply Reply Quote 1
              • travisdh1T
                travisdh1 @black3dynamite
                last edited by

                @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                This might help.
                https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                That just might, thanks.

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

                  @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                  This might help.
                  https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                  https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                  I found that link yesterday for my two pi-holes.

                  1 Reply Last reply Reply Quote 1
                  • travisdh1T
                    travisdh1 @black3dynamite
                    last edited by

                    @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                    This might help.
                    https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                    https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                    Those did get me further along in the process. At least I had the web interface showing up yesterday. Looks to me like the log files on a Fedora 28 install get dropped in the wrong place tho. They were sitting in /var/log instead of /var/log/pihole like they used to, and of course the web interface wasn't picking up any information.

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

                      This is my Nginx config for pihole. I also have it rewrite pihole.domain.com to pihole.domain.com/admin.

                      # List of backend pihole servers
                      upstream backend-pihole {
                          server 192.168.1.7:80;
                      }
                      
                      # Redirect all http to https
                      server {
                          listen 80;
                          listen [::]:80;
                      
                          server_name pihole.domain.com;
                      
                          return 301 https://$host$request_uri;
                      }
                      
                      # Reverse proxy for pihole.domain.com
                      server {
                          client_max_body_size 40M;
                      
                          listen 443 http2 ssl;
                          listen [::]:443 http2 ssl;
                          
                          # This will rewrite pihole.domain.com to pihole.domain.com/admin
                          rewrite ^/$ /admin permanent;
                      
                          server_name pihole.domain.com;
                      
                          ssl on;
                          ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
                          ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
                          ssl_dhparam /etc/ssl/certs/dhparam.pem;
                      
                          ########################################################################
                          # from https://cipherli.st/                                            #
                          # and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html #
                          ########################################################################
                      
                          ssl_protocols TLSv1.2;
                          ssl_prefer_server_ciphers on;
                          ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
                          ssl_ecdh_curve secp384r1;
                          ssl_session_cache shared:SSL:10m;
                          ssl_session_tickets off;
                          ssl_stapling on;
                          ssl_stapling_verify on;
                          resolver 1.1.1.1 1.0.0.1 valid=300s;
                          resolver_timeout 5s;
                          # Disable preloading HSTS for now.  You can use the commented out header line that includes
                          # the "preload" directive if you understand the implications.
                          #add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
                          add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
                          add_header X-Frame-Options DENY;
                          add_header X-Content-Type-Options nosniff;
                      
                          ##################################
                          # END https://cipherli.st/ BLOCK #
                          ##################################
                      
                          location /admin/ {
                              proxy_set_header X-Real-IP $remote_addr;
                              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                              proxy_set_header Host $http_host;
                              proxy_set_header X-NginX-Proxy true;
                              proxy_pass http://backend-pihole;
                              proxy_redirect off;
                              proxy_http_version 1.1;
                              proxy_set_header Upgrade $http_upgrade;
                              proxy_set_header Connection "upgrade";
                              proxy_connect_timeout 600;
                              proxy_send_timeout 600;
                              proxy_read_timeout 600;
                              send_timeout 600;
                          }
                      }
                      
                      1 Reply Last reply Reply Quote 3
                      • travisdh1T
                        travisdh1 @black3dynamite
                        last edited by travisdh1

                        @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                        This might help.
                        https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                        https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                        Rolling back to this. The web page is being displayed now, after following these instructions.

                        Now it's not displaying any statistics. I saw that the log files were in /var/log instead of /var/log/pihole (which was empty.) I wonder if something has been messed up in the install script at this point.

                        black3dynamiteB 1 Reply Last reply Reply Quote 0
                        • black3dynamiteB
                          black3dynamite @travisdh1
                          last edited by

                          @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                          @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                          This might help.
                          https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                          https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                          Rolling back to this. The web page is being displayed now, after following these instructions.

                          Now it's not displaying any statistics. I saw that the log files were in /var/log instead of /var/log/pihole (which was empty.) I wonder if something has been messed up in the install script at this point.

                          What OS are you using for Pi-Hole? I'm using Debian. If you are using Fedora and have SELinux set to enforcing then that can be causing the problem. See what happens when setting it to permissive.

                          travisdh1T 1 Reply Last reply Reply Quote 0
                          • travisdh1T
                            travisdh1 @black3dynamite
                            last edited by

                            @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                            @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                            @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                            This might help.
                            https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                            https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                            Rolling back to this. The web page is being displayed now, after following these instructions.

                            Now it's not displaying any statistics. I saw that the log files were in /var/log instead of /var/log/pihole (which was empty.) I wonder if something has been messed up in the install script at this point.

                            What OS are you using for Pi-Hole? I'm using Debian. If you are using Fedora and have SELinux set to enforcing then that can be causing the problem. See what happens when setting it to permissive.

                            It is Fedora 28, but I purposely disabled selinux on it for now when I started having these issues. Good guess tho.

                            black3dynamiteB 1 Reply Last reply Reply Quote 0
                            • black3dynamiteB
                              black3dynamite @travisdh1
                              last edited by

                              @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                              @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                              @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                              @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                              This might help.
                              https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                              https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                              Rolling back to this. The web page is being displayed now, after following these instructions.

                              Now it's not displaying any statistics. I saw that the log files were in /var/log instead of /var/log/pihole (which was empty.) I wonder if something has been messed up in the install script at this point.

                              What OS are you using for Pi-Hole? I'm using Debian. If you are using Fedora and have SELinux set to enforcing then that can be causing the problem. See what happens when setting it to permissive.

                              It is Fedora 28, but I purposely disabled selinux on it for now when I started having these issues. Good guess tho.

                              You can try repairing Pi-Hole by using this command: pihole -r

                              travisdh1T 1 Reply Last reply Reply Quote 0
                              • travisdh1T
                                travisdh1 @black3dynamite
                                last edited by

                                @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                                @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                                @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                                @travisdh1 said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                                @black3dynamite said in Anyone here have success accessing the Pi-Hole admin page from behind a reverse proxy?:

                                This might help.
                                https://www.c-rieger.de/pi-hole-behind-your-nginx-reverse-proxy/

                                https://www.reddit.com/r/pihole/comments/7n87y6/figured_out_how_to_use_pihole_in_a_nginx_reverse/

                                Rolling back to this. The web page is being displayed now, after following these instructions.

                                Now it's not displaying any statistics. I saw that the log files were in /var/log instead of /var/log/pihole (which was empty.) I wonder if something has been messed up in the install script at this point.

                                What OS are you using for Pi-Hole? I'm using Debian. If you are using Fedora and have SELinux set to enforcing then that can be causing the problem. See what happens when setting it to permissive.

                                It is Fedora 28, but I purposely disabled selinux on it for now when I started having these issues. Good guess tho.

                                You can try repairing Pi-Hole by using this command: pihole -r

                                Ran it, but it didn't make any difference. I really thing there is an issue with the log file locations, in that the web interface is probably looking in /var/log/pihole for the log files, but everything else is pointing to /var/log.

                                1 Reply Last reply Reply Quote 0
                                • 1 / 1
                                • First post
                                  Last post