Thursday, December 29, 2016

Online htpasswd tools don't work for WAMP Apache server

Scenario: You would like to password protect a folder in your website. You are running WAMP Server. The first thing you try is an online .htpasswd generation tool, but it fails to work. Solution: For WAMP server, you can find htpasswd.exe in C:\wamp\bin\apacheX.X\bin\htpasswd.exe. Simply generate contents of .htpasswd file with a command like this one: htpasswd -nb username1 password1 This will print out the resulting .htpasswd file to the console, and you can just copy/paste it to the .htpasswd file where needed. It works for WAMP servers. Probably, WAMP uses different encryption algorithm than standard Linux implementations of Apache. Documentation for Apache's htpasswd tool is here: http://httpd.apache.org/docs/2.2/programs/htpasswd.html

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...