Not able to access webui using prefix

The issue I am facing:
Not being able to access pihole web ui

Details about my system:
Docker
Latest version
using nginx proxy manager

What I have changed since installing Pi-hole:
the prefix to be /Pi-Hole/

Note: unable to access ui directry from 127.0.0.1 on host machine. docker container running in host network mode. error i get is to many redirects.

Debug Token: https://tricorder.pi-hole.net/H23cRT7g/

Can you please include your Compose file (or docker run command) and the proxy configuration?

These files will help understand what is happening in your system.

pihole:
    container_name: pihole
    image: pihole/pihole:latest
    network_mode: "host"
    environment:
      WEBPASSWORD: ${PI_HOLE_PASSWORD}
      WEB_PORT: '1342'
    volumes:
      - './pihole:/etc/pihole'
      - './pihole/dnsmasq.d:/etc/dnsmasq.d'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped


  dockerproxy:
    image: ghcr.io/tecnativa/docker-socket-proxy:latest
    container_name: dockerproxy
    environment:
      - CONTAINERS=1 # Allow access to viewing containers
      - SERVICES=1 # Allow access to viewing services (necessary when using Docker Swarm)
      - TASKS=1 # Allow access to viewing tasks (necessary when using Docker Swarm)
      - POST=0 # Disallow any POST operations (effectively read-only)
    ports:
      - 127.0.0.1:2375:2375
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro # Mounted as read-only
    restart: unless-stopped
    networks:
      selfserv:
        ipv4_address: 10.34.0.18
networks:
  selfserv:
    external: true
    ipam:
      config:
        - subnet: 10.34.0.0/24
 location /Pi-Hole/ {
    

    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Scheme $scheme;
    proxy_set_header X-Forwarded-Proto  $scheme;
    proxy_set_header X-Forwarded-For    $remote_addr;
    proxy_set_header X-Real-IP		$remote_addr;

    proxy_pass       http://192.168.0.34:1342/Pi-Hole/;

    
    

    # Access Rules: 4 total
    
    allow 172.18.0.0/24;
    
    allow 10.34.0.0/24;
    
    allow 192.168.0.0/24;
    
    allow 94.174.102.24;
    
    deny all;

    # Access checks must...
    
    satisfy any;
    


    
    
    # Block Exploits
    include conf.d/include/block-exploits.conf;

    
    # Force SSL
    include conf.d/include/force-ssl.conf;


    

    # HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
  add_header Strict-Transport-Security $hsts_header always;





    
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    proxy_http_version 1.1;
    
  }

https://tricorder.pi-hole.net/brkC74si/
^^ is the correct debug link
No aditional config. Im also unable to to acess via http://ip:port/Pi-Hole/

Update:

i have it working via url at http://mydomain.com/Pi-Hole/

just by adding

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-Nginx-Proxy true;
rewrite ^/Pi-Hole/(.*)$ /$1 break;

into the "advanced" section of the custom location in nginx proxy manager. still cant access via ip and port though

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.