Technical Recipes

Monday 19, December 2011

Just add the following lines to your nginx.conf file:

location  /mydirectory  {
  auth_basic            "Restricted";
  auth_basic_user_file  htpasswd;
}

The htpasswd could be create with the following command:

$ htpasswd -c htpasswd myuser

To see how to do that with Apache take a look here.


Tags

My latest tweets

tweet @greggpollack Looking forward for it!!
tweet @gaalal Puerta del Sol, 19:30h #PrimaveraValenciana #yotambiensoyelenemigo
tweet Hoy más que nunca: Vergüenza me daría ser policía #PrimaveraValenciana
tweet Cuando el "enemigo" son los estudiantes y los periodístas, algo muy grave está pasando #PrimaveraValenciana
Buy me a coffee!! Coffee cup

Advertisment