Friday, 23 June 2006
Geek notes
ZSH on Mac OS X
You might recall that I’m making a switch to zsh
.
Its going swimmingly, though I find myself envoking tcsh
often only because my zsh
rc files are not as mature as my tcsh
rc files. Okay, my zsh
rc files are almost empty, but that’s not what this is about.
Mac OS X provides the zsh
, but nothing in etc
for system wide initialization. Where to start, then?
Linux. Fedora Core 5. Or any BSD heritage OS with zsh
will probably do. I just scp
’d my FC5 etc/zsh*
files to my Mac, and I was off, enjoying immediately some defaults of zsh
.
Correcting my domain name misspelling
The touch points for this were many, but implementation was straightforward.
The most significant hurdle was testing. I wanted to continue answering requests on the old, misspelled name so I went with a combination of ServerAlias
and mod_rewrite
. My virtual host looks something like:
<VirtualHost ###.###.###.###:80> # real name ServerName anothercaffeinatedday.com # other names including misspelled domain ServerAlias www.anothercaffeinatedday.com anothercaffeniatedday.com www.anothercaffeniatedday.com ServerAdmin someone@someplace.com DocumentRoot /path/to/document/root #some logging options <Directory "/path/to/document/root"> # some options </Directory> <IfModule mod_rewrite.c> RewriteEngine on # test the HOST name for the misspelling then rewrite and redirect # pretty basic stuff right out of the Apache manual for mod_rewrite RewriteCond %{HTTP_HOST} ^(www\.)?anothercaffeniatedday\.com [NC] RewriteRule ^/(.*) http://www.anothercaffeinatedday.com/$1 [L,R] </IfModule> #some mod_jk options </VirtualHost>
All of this of course requires the proper DNS settings too; left as an exercise for the reader…but if your reading this, you probably have a good understanding of what that requires.
[Trackback URL for this entry]