httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thias <Mark.Th...@bnpi.com>
Subject RE: [users@httpd] RewriteMap not able to execute python script
Date Wed, 17 Dec 2003 17:13:20 GMT
Thank you very much. Your solution nailed it.
Mark

-----Original Message-----
From: André Malo [mailto:nd@perlig.de]
Sent: Tuesday, December 16, 2003 5:30 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] RewriteMap not able to execute python script


* Mark Thias <Mark.Thias@bnpi.com> wrote:

> Problem: Trying to use mod_rewrite to load balance per
> http://http.apache.org/docs/misc/rewriteguide.html. I have tried a number
of
> configurations but always get the following error upon starting Apache.
> Apache does not start as a result.
> 
>  "(OS 193)%1 is not a valid Win32 application.  : mod_rewrite: could not
> startup RewriteMap program (null)" 
> 
> My environment is as follows: 
>  1. Apache 2.0.48
>  2. Win2K 5.00.2195 Service Pack 3
>  3. Python23
> 
> I installed Python in c:\tools\Python23 and set the windows system path. I
> have run the script from the command line and it works as designed. The
> Python script, proxy.py, resides in my root directory:
...
> I have the following entries in httpd.conf
> 
> RewriteEngine on
> RewriteMap server prg:/proxy.py
> #RewriteMap server prg:c:/proxy.py (tried this)
> #RewriteMap server prg:c:\proxy.py (tried this)

Try referencing the python executable with the script as its first argument
like:

RewriteMap server "prg:c:/path/to/python.exe c:/path/to/proxy.py"

(untested)

nd

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


This email may contain confidential and privileged material for the sole use
of the intended recipient. Any review or distribution by others is strictly
prohibited.  If you are not the intended recipient please contact the sender
and delete all copies.

Mime
View raw message