Newsgroups: comp.lang.python
From: rolf...@hotmail.com (Rolfe)
Date: 29 Sep 2003 16:06:16 -0700
Local: Mon, Sep 29 2003 7:06 pm
Subject: Running mod_python on Apache on Windows2000 *
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow
these instructions verbatim and you shouldn't have any trouble. These instructions are based on "http://www.modpython.org/live/current/doc-html/inst-testing.html". I've added specific information such as Windows filepaths and filenames so there's no ambiguity on what you should do. I encourage you to copy and paste to avoid typing errors. Cheers, Rolfe INSTALLING MOD_PYTHON 1. Make a default installations of the latest/best version of Apache. 2. Make a default installation of the latest/best version of 3. Open C:\Program Files\Apache Group\Apache2\conf\httpd.conf in 4. In httpd.conf, just below the line "#LoadModule ssl_module #Start of section pasted in by YOURNAMEGOESHERE LoadModule python_module modules/mod_python.so <Directory "C:\Program Files\Apache Group\Apache2\htdocs/test/"> AddHandler python-program .py </Directory> AddHandler python-program .py </Directory> (NOTE: Don't mess around with the other configuration settings in 5. Save and close httpd.conf and wait a few seconds. 6. Restart Apache by clicking the Apache monitor icon in your systray PROCEDURE COMPLETED ##### TESTING MOD_PYTHON ####### 1. Create a directory called "test" in htdocs so you end up with 2. Create a text file called mptest.py in "C:\Program Files\Apache 3. Paste the following text into mptest.py: from mod_python import apache def handler(req): req.write("Hello World!") 4. Save and close mptest.py. 6. Assuming your sitting at the same machine that's running Apache, 7. Repeat step 6 using the URL "http://localhost/cgi-bin/mptest.py" PROCEDURE COMPLETED - mod_python works! ######## NOTES ######### Remove either of the following sections (from <Directory "C:\Program Files\Apache Group\Apache2\htdocs/test/"> AddHandler python-program .py </Directory> AddHandler python-program .py </Directory> Thank you Peter Maas for your response on comp.lang.python You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||