simple http server
Gelo Ilzi
geloilzi at hotmail.com
Wed Mar 17 10:43:32 EST 2004
I'm trying to implement a very simple http server with cgi functionality.
The code is simple:
import CGIHTTPServer, BaseHTTPServer
httpd = BaseHTTPServer.HTTPServer(('',8000),
CGIHTTPServer.CGIHTTPRequestHandler)
httpd.serve_forever()
I've created a subdir 'cgi-bin' which contains a python script. Now when I
enter this directory, i.e., go to the url http://localhost:8000/cgi-bin/ my
browser shows:
Error response
Error code 403.
Message: CGI script is not a plain file ('/cgi-bin/').
Error code explanation: 403 = Request forbidden -- authorization will not
help.
Plain html pages are ok.
It seems I misunderstand something very basical. Could somebody help me
please.
Thank you in advance.
More information about the Python-list
mailing list