On Sun, Nov 02, 2003 at 10:12:14PM -0500, Greg Ward wrote: > This isn't really a Quixote question, but I figured I'd ask a nice > friendly group before heading out into the wider world: has anyone had > much luck running Quixote apps with the Debian apache package (either > 1.3 or 2.0)? > > I'm trying to get it working so I *don't* have to use ugly > "/cgi-bin/myapp.cgi"-style URLs, but I just cannot get Apache to run a > CGI script outside of the ScriptAlias dir. (And never mind getting > FastCGI working.) All it will bloody do is show me the source for the > script. Anyone seen anything like this before? Have a look at the 'Dynamic Content with CGI' document in the Apache docs (http://httpd.apache.org/docs-2.0/howto/cgi.html). There's a section on CGI outside of ScriptAlias directories. This works for me with Apache 2.0 on Debian (putting it inside my default VirtualHost): Alias /testme /usr/local/www/cgi-binAddHandler cgi-script cgi Options +ExecCGI Then http://myserver/testcgi/test.cgi works. I had to add the AddHandler inside the, even though I have the same one sitting outside. Otherwise, it gave the error (in the logs) 'Option ExecCGI is turned off for this directory'. If you don't want the .cgi extension, start playing around with RewriteRules. You're probably best listing your cgi scripts, as in RewriteRule ^/testme/test(.*) /usr/local/www/cgi-bin/test.cgi?$1 [T=application/x-httpd-cgi,L] So now http://myserver/testme/test?hello works as expected, and so does http://myserver/testme/test/hello. Alternatively, ScriptAliasMatch /testme/test(.*) /usr/local/www/cgi-bin/test.cgi$1 does the same as Alias/Directory/RewriteRule stuff above. If you don't want to do the above for each script, this seems to work: ScriptAliasMatch /testme/([-a-zA-Z0-9]+)(.*) /usr/local/www/cgi-bin/$1.cgi$2 (assuming your script names are semi-sane). -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm@physics.mcmaster.ca