you are in: codestackercodes [RSS] → tag: apache [RSS]

generating a .htpasswd file Delicious

show/hide lines
   1  htpasswd -bc .htpasswd user pass 
created by leozera — 18 November 2008 — get a short url — tags: .htpasswd apache embed

Password protecting your pages with htaccess Delicious

create a .htaccess file with this content.

the .htpasswd contains a user and encrypted password (e.g.: leo:4tHAiRmQ4OpjM). create a encrypted password in: http://www.kxs.net/support/htaccess_pw.html

show/hide lines
   1  AuthUserFile /home/leonardo/public_html/project/.htpasswd
   2  AuthGroupFile /dev/null
   3  AuthName "Restricted Access"
   4  AuthType Basic
   5  <limit GET>
   6  require valid-user
   7  </limit>
created by leozera — 16 July 2008 — get a short url — tags: apache htaccess embed

activing php_auth on dreamhost Delicious

by default, dreamhost runs php as cgi.
the follow line switchs from cgi to apache module execution, supporting php_auth.

show/hide lines
   1  // create a .htaccess with this: 
   2  AddHandler application/x-httpd-php .php
created by anonymous — 04 July 2008 — get a short url — tags: apache dreamhost htaccess php embed