0

I have an nginx server. I'd like to have directories available online but only if a certain password is supplied. Would it be bad to do something like:

location /password=mysuperstrongpassword {
      root /mydir
}

Is there a better way of accomplishing this?

Along the same lines, can someone point me in the direction of how to write a script that creates a new password every week or so, rewrites this page, and emails me the new password? Thanks!

eatonphil
  • 183
  • 3
  • 12

1 Answers1

2

Your super-strong password is likely to be stored in plain-text logs, your analytics solution, etc.

nginx has a module to do the standard Apache-style HTTP basic authentication.

techraf
  • 4,163
  • 8
  • 27
  • 44
ceejayoz
  • 32,469
  • 7
  • 81
  • 105