durusmail: quixote-users: lighttpd/scgi/quixote question
lighttpd/scgi/quixote question
2007-06-16
2007-06-16
lighttpd/scgi/quixote question
Matthew Slane
2007-06-16
Hi

I'm really struggling to get quixote up and running using scgi with
lighttpd.

I'm using 2.5b with Python 2.5


The scgi part of lighttpd is as follows:


scgi.server             = ( "/scgi" =>
                               ( "localhost" =>
                                (
                                   "port" => 3000,
                                   "host" => "127.0.0.1",
                                    "check-local" => "disable"
                                )
                              )
                            )

I'm using the scgi_server that comes bundled with Quixote, with a simple
app downloaded from a tutorial site

from quixote.publish import Publisher
from quixote.directory import Directory

def create_publisher():
    """
    A factory method for creating publishers.  In this case, just use
    the default publisher.
    """
    return Publisher(Hello4())

class Hello4(Directory):
    """
    The Web app itself.
    """
    _q_exports = [""]                   # export index.

    def _q_index(self):
        return "hello, world."

The command I'm using to start the scgi server is:

python simple_server.py --factory=hello4.create_publisher --host
127.0.0.1 --port 3000

I've tried with and without the --host setting and various alternatives,
the static IP for the local network, domain name, network name

I can connect using lynx on the server that I'm trying to get this up
and running on directly to the scgi server on port 3000.  Other machines
on the network can't.  So that's one problem, probably very easy to fix.

Lighttpd is simply not working with scgi.  If i send a request to /scgi
I get a 404, if i try /scgi/  the browser just churns and churns and
nothing comes back, from then on, even lynx on the server can't connect
to the scgi server I just get "HTTP request sent; waiting for response."

On killing the scgi server with ctrl-c twice I get:

File "/usr/lib/python2.5/BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
  File "/usr/lib/python2.5/BaseHTTPServer.py", line 299, in
handle_one_request
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib/python2.5/socket.py", line 346, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
----------------------------------------
localhost.localdomain - - [16/Jun/2007 02:21:47] "GET / HTTP/1.0" 200 -
Traceback (most recent call last):
  File "simple_server.py", line 116, in 
    https=options.https)
  File "simple_server.py", line 101, in run
    httpd.serve_forever()
  File "/usr/lib/python2.5/SocketServer.py", line 201, in serve_forever
    self.handle_request()
  File "/usr/lib/python2.5/SocketServer.py", line 217, in handle_request
    request, client_address = self.get_request()
  File "/usr/lib/python2.5/SocketServer.py", line 374, in get_request
    return self.socket.accept()
  File "/usr/lib/python2.5/socket.py", line 167, in accept
    sock, addr = self._sock.accept()
KeyboardInterrupt

I don't know python very well, setting up Quixote is hopefully my way of
learning it.

Any clues as to what I'm doing wrong?

Thanks

Matt

--- Scanned by M+ Guardian Messaging Firewall ---


reply