An introduction

This is a semi-public place to dump text too flimsy to even become a blog post. I wouldn't recommend reading it unless you have a lot of time to waste. You'd be better off at my livejournal. I also have another blog, and write most of the French journal summaries at the Eurozine Review.

Why do I clutter up the internet with this stuff at all? Mainly because I'm trying to get into the habit of displaying as much as possible of what I'm doing in public. Also, Blogger is a decent interface for a notebook

Friday, April 15, 2011

HTTP authentication (snippet)

And the reason for that faff is to start using this blog more to keep track of snippets of code and config that I'm constantly re-using. That is, the things you have half inside your head anyway, but need to look up exactly what the command is.

One from today: setting up basic HTTP Authentication with Apache:

vps:/etc/apache2/sites-enabled# htpasswd -c /etc/apache2/anaad.passwd admin
New password:
Re-type new password:
Adding password for user admin

edit .htaccess:

AuthType Basic
AuthName "Anaad"
AuthUserFile /etc/apache2/anaad.password
Require valid-user

No comments:

Post a Comment