0

Hi I'm trying to set up nginx to reduce the amount of ports I have open

I'm trying to add a password and I've looked all over the web and can't seem to get the auth part to work correctly

I created a .htpasswd file and placed it in the nginx conf folder and added the following to the location

location /nzbget {
    proxy_pass http://127.0.0.1:6789;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    auth_basic  "give it to me.";
    auth_basic_user_file .htpasswd;

Yet when I try and access it all I get is a 403 forbidden error

Please tell me what I'm doing wrong

Phairplay
  • 273
  • 2
  • 4
  • 16

1 Answers1

0

The problem was down to the .htpasswd file not being 100% correct.

Create it using notepad + solved my problem

Phairplay
  • 273
  • 2
  • 4
  • 16