httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thias <>
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.

-----Original Message-----
From: André Malo []
Sent: Tuesday, December 16, 2003 5:30 PM
Subject: Re: [users@httpd] RewriteMap not able to execute python script

* Mark Thias <> wrote:

> Problem: Trying to use mod_rewrite to load balance per
> I have tried a number
> 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,, resides in my root directory:
> I have the following entries in httpd.conf
> RewriteEngine on
> RewriteMap server prg:/
> #RewriteMap server prg:c:/ (tried this)
> #RewriteMap server prg:c:\ (tried this)

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

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



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

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.

View raw message