qwer
qwer at quirxi.com
Tue Apr 15 21:40:36 EST 2003
Hello, I just have installed apache (2.0.45), python (2.2.2), and ,mod_python ( 3.0.3 ). Then I have added following lines to apache configuration file httpd.conf: <Directory "/home/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all # AddHandler python-program .py # PythonHandler qwer AddHandler python-program .py PythonHandler mod_python.publisher PythonDebug On </Directory> For testing purposes I added the little python script "test.py" to the directory "home/www/cgi-bin" and called it with the URL "http://localhost/cgi-bin/test.py/login". Here is the script: ----- snip ---- from mod_python import apache def login( req ): req.content_type = "text/html" req.send_http_header() req.write( "Hello World!" ) return apache.OK ----- snip ---- But for me it seems that the mod_pyhton handler does not work propely because I get following output: Hello World!<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>200 OK</title> </head><body> <h1>OK</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator, qwer at jango and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> <hr /> <address>Apache/2.0.45 (Unix) mod_ssl/2.0.45 OpenSSL/0.9.7 mod_python/3.0.3 Python/2.2.2 Server at localhost Port 80</address> </body></html> It is strange that the title tag contains "200 OK" and the output of the programm is given out together with an server error message. Does anybody know what the problem could be ? Any help would be apreciated .... Cheers Arno
|