httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Magee <sma...@sacto.com>
Subject How do you execute UNIX script file
Date Mon, 29 Jul 2002 21:15:45 GMT
I'm trying to get the basic UNIX tr command to work within a script file.
I have the following set in my httpd.conf file...

     RewriteEngine on
     RewriteMap    convert    prg:/usr/local/bin/conv.sh
     RewriteRule ^(.*)$ ${convert:$1}

/usr/local/bin/conv.sh is a UNIX script with 755 permission and root:root
ownership.

#!/bin/bash
/usr/bin/tr '[A-Z ]' '[a-z_]'

I ran apachectl configtest and all is "ok" then I run apachectl restart.
When trying to load a page, I get

Bad Request
Your browser sent a request that this server could not understand.
Apache/1.3.26 Server at web05.arb.ca.gov Port 80

I tried Options All for the /usr/local/bin directory.  I have tried putting
a pipe as the first
character in the UNIX script file.  I have tried AddHandler with ".sh"
added.  If I
rename the "/usr/local/bin/conv.sh" file and run "apachectl configtest", it
states file not
found.  If the /usr/local/bin/conv.sh file is empty, I get the same results.

Any help would be appreciated.
Steve Magee



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message