I am trying setup pihole to be able to access via https, but getting 400 error. Currently, I am able to access with this lines
http://local-ip-address/admin/
http://pi.hole/admin/
This is the error when I try to access via https://pihole.domain.com
400
THE REQUESTED URL COULD NOT BE RETRIEVED: /ADMIN/
This is my nginx confi file.
## Pihole Server
## SSL Redirects non www
server {
listen 80;
server_name www.pihole.domain.com pihole.domain.com;
return 301 https://pihole.domain.com$request_uri;
}
server {
listen 443 ssl http2;
server_name www.pihole.domain.com;
include /etc/ssl/domain.com.conf;
return 301 https://pihole.domain.com$request_uri;
}
## End SSL Redirects non www
server {
listen 443 ssl;
index index.html index.htm index.php;
server_name pihole.domain.com;
include /etc/ssl/domain.com.conf;
## Begin - Server Info
location / {
proxy_pass_header Authorization;
proxy_pass http://192.168.1.10/admin/;
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_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering off;
client_max_body_size 0;
proxy_read_timeout 36000s;
proxy_redirect off;
}
}
## End Pihole Media Server