[mod_python] Apache as a Windows Service Question

John Keyes johnkeyes at gmail.com
Fri Dec 15 04:07:10 EST 2006


Hi,

Is it possible to run Apache as a service on Windows without
setting system wide environment variables?

I am currently launching Apache with a batch script like the
following:
  set PYTHONHOME=d:\MyApp\Python
  set PATH="%PYTHONHOME%";%PATH%
  start d:\MyApp\Apache\apache -f d:\MyApp\httpd.conf"
and this works as expected.

I am bundling Python and Apache in my installer and I would
like to be able to install the Apache (with mod_python) I ship
as a service.

The error I am seeing is when I try to run my app with this
configuration is:
  [client 127.0.0.1] python_handler: Can't get/create interpreter.
which is happening because the PATH isn't set correctly.

What I would like to be able to do is use some directives
like the following in the .conf file:
  PythonHome d:/MyApp/Python
so mod_python can then set the PATH and PYTHONHOME itself.
Is something like this possible?

One of the prerequisites I have is that a reboot shouldn't be
required after installation.

Thanks for any help or advice,
-John K


More information about the Mod_python mailing list