RES: [mod_python] Configuring Apache Server With Mod Python

Alejandro Michelin Salomon ( Adinet ) alejmsg at adinet.com.uy
Fri Apr 28 13:43:42 EDT 2006


Jim :

I find this directive in the manual --> PythonInterpreter

I resolved with this :

<Directory "D:/webroot">
          AddHandler mod_python .py
          PythonHandler mptest
          PythonInterpreter mptest
          PythonDebug On
</Directory>

Now i can run .py files in each direcotory under localhost.

Thanks for the help.



-->-----Mensagem original-----
-->De: Jim Gallacher [mailto:jpg at jgassociates.ca] 
-->Enviada em: sexta-feira, 28 de abril de 2006 14:13
-->Para: Alejandro Michelin Salomon ( Adinet )
-->Cc: Mod_Python at Modpython. Org
-->Assunto: Re: [mod_python] Configuring Apache Server With Mod Python
-->
-->
-->Alejandro Michelin Salomon ( Adinet ) wrote:
-->> Hi:
-->> 
-->> I am new to python.
-->> 
-->> I need same help.
-->> 
-->> I add this line to httpd.conf --> LoadModule python_module 
-->> modules/mod_python.so
-->> 
-->> And then :
-->> 
-->> Apache DocumentRoot is "D:/webroot"
-->> 
-->> <Directory "D:/webroot/test">
-->> 
-->>         AddHandler mod_python .py
-->>         PythonHandler mptest
-->>         PythonDebug On
-->> </Directory>
-->> 
-->> I runs --> localhost/test/mptest.py
-->> 
-->> Runs ok a test
-->> 
-->> When try tu run the same file in localhost/mptest.py
-->> 
-->> The apache only prints python code in the page.
-->> 
-->> Who to run others .py files out of localhost/test, or configuring 
-->> modpython to work in all subdirectories under localhost structure?
-->
-->You could use the publisher handler and configure your 
-->webroot directory 
-->accordingly:
-->
--><Directory "D:/webroot">
-->          AddHandler mod_python .py
-->          PythonHandler mod_python.publisher
-->          PythonDebug On
--></Directory>
-->
-->Check the documentation for more information on publisher.
-->
-->Jim
-->
-->
-->-- 
-->No virus found in this incoming message.
-->Checked by AVG Free Edition.
-->Version: 7.1.385 / Virus Database: 268.5.1/326 - Release 
-->Date: 27/4/2006
-->
-->
-->-- 
-->No virus found in this incoming message.
-->Checked by AVG Free Edition.
-->Version: 7.1.385 / Virus Database: 268.5.1/326 - Release 
-->Date: 27/4/2006
--> 
-->

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 27/4/2006
 



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/326 - Release Date: 27/4/2006



More information about the Mod_python mailing list