Best way of having a password protected directory in nginx? via /r/learnprogramming


Best way of having a password protected directory in nginx?

I'm transfering to nginx and had a directory with a password using .htaccess and .htpasswd. How can I achieve something like this with nginx? I'm storing them on the website because I need them to be easily downloadable with a link.

I recon I could store those files outside of the website and make something that downloads them using php. This way I can also implement a password.

Submitted July 12, 2017 at 11:58AM by florensie
via reddit http://ift.tt/2sQGt8D

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s