Newbie Question!

fleet at teachout.org fleet at teachout.org
Tue Aug 7 14:26:06 EDT 2001


On Tue, 7 Aug 2001, Steve Holden wrote:


> > [/home/dev/cbamc]$ python cgiserver.py
> > localhost.localdomain - - [07/Aug/2001 11:32:26] code 403, message
> Directory listing not
> > supported
> > localhost.localdomain - - [07/Aug/2001 11:32:26] "GET / HTTP/1.0"
> 403 -
> > Traceback (innermost last):
> >   File "cgiserver.py", line 5, in ?
> >     httpd.serve_forever()
> >   File "/usr/lib/python1.5/SocketServer.py", line 195, in
> serve_forever
> >     self.handle_request()
> >   File "/usr/lib/python1.5/SocketServer.py", line 210, in
> handle_request
> >     request, client_address = self.get_request()
> >   File "/usr/lib/python1.5/SocketServer.py", line 223, in get_request
> >     return self.socket.accept()
> > KeyboardInterrupt <---- me getting out
> >
> > The directory contains only 'index.html' (rather lengthy) and
> 'cgiserver.py.'
> >
>
> Seems like it might be a versioning problem, if indeed there really is
> anything wrong at all. From the traceback, it looks like your server was
> sitting there waiting to accept a request. I'm guessing you didn't use
> the right URL in your browser! In which case see below for the right
> one...

What I see in the browser when I go to :8000 is:

Error response Error code 403.
Message: Directory listing not supported.
Error code explanation: 403 = Request forbidden -- authorization will not help.

> It works fine for me under Python 2.0 on Windows 98, for example:

I'm using RH 7.0 (forgot to mention that).

> it's rather a long time since I used it. If you don't like putting a
> port number in your URLs, just change "8000" to "80" in the server code.

Changing to port 80, I get a "Test Page" that says Apache is installed
correctly and (as administrator) I may now add content to this page.

				- fleet -





More information about the Python-list mailing list