2

We're using Nginx on the server reserved for development (testing) and we want to prevent anyone outside the company from gaining access to the sites under development. However one of the sites uses online payment and for that a folder need to be accessible by anyone, used for the callback from the credit card company..

Is there any way we can protect an entire website but leave just one folder and all the files inside open ?

Regards,

Wael

kalbasit
  • 766
  • 8
  • 17

1 Answers1

7
server {
        auth_basic "go away";
        location /a {
                auth_basic off;
        }
}
rzab
  • 1,657
  • 11
  • 7
  • The syntax as is did not work, I had to put the auth_basic "go away" inside the location / {} block – kalbasit Mar 30 '11 at 15:56
  • Ok, could be true in an old version. 0.8.54 accepts it in the server. Anyway, looks like the problem is solved. – rzab Mar 30 '11 at 16:18