[mod_python] Help installing mod_python on apache and xp

Graham Dumpleton graham.dumpleton at gmail.com
Tue Mar 13 16:14:15 EST 2007


You have stuffed up your Apache configuration at some point as
evidenced by message:

> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/

You should have had a configuration entry somewhere of the form:

<Directory C:/Program Files/Apache Software Foundation/Apache2.2/htdocs>
Order deny, allow
Allow from all
</Directory>

What happened to that?

I might then suggest you read instructions at:

  http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking

and get it working using .htaccess method in subdirectory of htdocs.
Then you might read the Apache documentation and understand how
Directory directives work so as to know the difference and use them to
set it all up from main configuration.

Graham

On 13/03/07, Nuno Rodrigues <nunoalexandre.rodrigues at gmail.com> wrote:
>
>
>
> Hello to you all,
> I'm a newbie on Python and on Apache, but I've searched the faq for the same error  without sucess.
> First the facts:
>
> Apache HTTP Server 2.2.4 + Python 2.5 + Mod_python 3.3.1 on XP Pro
>
> I've used the windows installers without any errors. Manually added the following lines to the httpd.conf server file:
>
> LoadModule python_module modules/mod_python.so
>
> <Directory /mptest>
>     AddHandler mod_python .py
>     PythonHandler mptest
>     PythonDebug On
>     AllowOverride FileInfo
> </Directory>
>
> The server test page works and I can get the mod_python version on the python command line, but when I put my python test on the browser instead of "Hello World!" I get the entire python code:
> from mod_python import apache
>
> def handler(req):
>    req.content_type = 'text/plain'
>    req.write("Hello World!")
>    return apache.OK
>
> What's wrong with this ? Can anyone please help me out ?
>
> PS:
> Error Log(errors and warnings only):
> (...)
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/CFIDE
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/CFIDE
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/temp.html
>
> (...)
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mptest.py
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mptest
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mptest.py
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mptest
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mptest.py
> [error] [client 127.0.0.1] client denied by server configuration: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/
>
> (...)
> [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request.  : winnt_accept: Asynchronous AcceptEx failed.
>
> (...)
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/mptest.py
> (...)
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
> [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>


More information about the Mod_python mailing list