0

I have a problem configuring an nginx as reverse proxy. On RaspPI with raspberry Lite OS, I installed the pihole reachable under: 192.168.177.77:81

nginx runs on port 80. In the hosts file on a mac notebook, I created the entry:

192.168.177.77 pihole.dummydomain.com

On the RaspPi, I configured NGINX as reverse proxy: 192.168.177.77:80 should redirects to 192.168.177.77:81

NGINX config: IN /etc/nginx/sites-enabled/pihole.dummydomain.com.conf

server { 
    listen 80;
    server_name pihole.dummydomain.com;
    location / {
        proxy_pass http://192.168.177.77:81;
        proxy_buffering off;
    }
}

The redirect does not work. Visting pihole.dummydomain.com shown the nginx default index page instead of the pihole welcome page

Could you please help?

sd_19x4
  • 17
  • 4
  • Why do you need nginX on your Raspberry? Are you planning to have many virtual hosts? If not - then you don't need a reverse proxy, simply expose your app directly. – IVO GELOV Nov 15 '21 at 15:12
  • I am planning other virtual hosts. This is only a try – sd_19x4 Nov 15 '21 at 15:15

1 Answers1

1

Problem solved. I did a mistake. I had a former nginx installation and I configured the wrong file. I removed all nginx installations and install a proper one. Now it works as expected

sd_19x4
  • 17
  • 4