Giter Site home page Giter Site logo

Comments (4)

veerendra2 avatar veerendra2 commented on May 13, 2024

UPDATE; It worked due to browser cache

from raspberrypi-homeserver.

veerendra2 avatar veerendra2 commented on May 13, 2024

Tried below config

location /admin/ {
  resolver 127.0.0.11 valid=30s;
  set $upstream pihole;

  proxy_pass http://$upstream/admin/;  #http://pihole:80/admin/; #$upstream;
  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_hide_header X-Frame-Options;
  proxy_set_header X-Frame-Options "SAMEORIGIN";
  proxy_read_timeout 90;
}
  • Above config is not working in browser with This problem can sometimes be caused by disabling or refusing to accept cookies. and HTTP 302 error, but the endpoint seems up when try with httpie
$  http --verify=no  --check-status https://192.168.0.120/admin/login.php
HTTP/1.1 302 Found
Cache-Control: no-store, no-cache, must-revalidate
Connection: keep-alive
Content-Length: 0
Content-Security-Policy: default-src 'self' 'unsafe-inline';
Content-Type: text/html; charset=UTF-8
Date: Thu, 29 Dec 2022 22:30:27 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Location: login.php
Pragma: no-cache
Referrer-Policy: same-origin
Server: nginx/1.23.2
Set-Cookie: PHPSESSID=33cobiugh16cqg4i89aus42l8i; path=/; HttpOnly; SameSite=Strict
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: none
X-Pi-hole: The Pi-hole Web interface is working!
X-XSS-Protection: 1; mode=block
  • Even the browser gets redirect to https://192.168.0.120/admin/login.php when homer has https://192.168.0.120/admin/
  • Tried with upstream with max_fails=3 fail_timeout=30s; and resolver, but no luck!
  • DNS resolving is work
veerendra@atom:/opt/apps/nginx$ docker exec -it nginx nslookup pihole 127.0.0.11
Server:         127.0.0.11
Address:        127.0.0.11:53

Non-authoritative answer:
Name:   pihole
Address: 172.18.0.5

Non-authoritative answer:

from raspberrypi-homeserver.

veerendra2 avatar veerendra2 commented on May 13, 2024
  • Working when I remove varaible in proxy_pass
  • The nginx is failing to start if it cant resolve the host. Can't found a why how to prevent stopping the host is down. Tried with set too

from raspberrypi-homeserver.

veerendra2 avatar veerendra2 commented on May 13, 2024

Closing the issue, cant find fix. Maybe switch to caddy in future

from raspberrypi-homeserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.