You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Steve Magee <sm...@sacto.com> on 2002/07/29 23:15:45 UTC
How do you execute UNIX script file
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