Just a quick little problemsolving exercise I did this afternoon, revolving around the discovery of the ScriptInterpreterSource apache directive.
The setup: I develop on a Windows laptop and deploy my stuff to shared hosting on Linux (specifically Site5, which has good perl support and are happy to install modules). I'm just running small scale stuff, so I just roll out plain CGI. Simpler and faster and works for small values of n. I have shell access and subversion running and that combo Just Works. What was before right now a little annoying was local Win32 test of the scripts without modification, because apache cgi uses the hashbang line to determine the cgi executable - which I also need on the host with a different setting. Thankfully, adding
to the CGI config deals with that. Now Win32 apache looks for the string valueScriptInterpreterSource Registry
in the registry instead of the hashbang and Bob's your uncle.HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command
<DirectoryMatch cgi-bin>directive helpful, regex matching against 10 parallel cgi subdirectories, so I don't have to set each one up separately. And a little gotcha I encountered:
- remember the FollowSymlinks or the ExecCGI is disabled (? or so it seems from error messages)SetHandler cgi-script
Options ExecCGI FollowSymLinks -Indexes