Basic Password Protection for Apache Webpage

This is the bare bones basics to protect a web page or series of pages on an Apache web server.

.htaccess file

AuthName "SectionName" AuthType Basic AuthUserFile /full/path/to/.htpasswd Require valid-user

Replace SectionName with the name of what you are protecting (in and below the directory that you are putting the .htaccess file in. Example: [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Using Public/Private Key Pairs with SSH

This is one of those subjects that is a little difficult to convey clearly. It is a logical process and not difficult…but it is precise in the sense that certain files must be correct, be in the right places and have correct permissions. I’ve organized these instructions in three parts, key generation; local (client) [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter

Padding a Numeric in Bash

I needed to pad a day of the month value to 2 places in a bash script.

This is made easy by the GNU program printf, which is part of standard distributions of Linux. In the following script snippet, the current day of the month is passed from the command invocation (or, if not [...]

share and enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Fark
  • Reddit
  • Slashdot
  • StumbleUpon
  • Twitter