durusmail: quixote-users: SCGI demo and http 301 error
SCGI demo and http 301 error
2006-02-11
SCGI demo and http 301 error
william@opensource4you.com
2006-02-11
strange ....
But I can reproduce it: lighttpd-1.4.7, Quixote-2.4, scgi-1.10

I've observed that by giving a not null path it works (???).

put script_name="/t" as parameter of run() in scgi_mini_demo.py, and adapt
lighttpd.conf accordingly. Then it will work :o).






Tom Lesters wrote:
> Hi,
>
> I just installed Quixote 2.4 and SCGI both released on 12/23/2005
>
> I'm running on Fedora Core 3 with python 2.3.
>
> I just want to see if scgi server is working.
>
> So I renamed Quixote-2.4
> /demo/mini_demo.py to scgi_mini_demo.py and
> changed the line:
> from quixote.server.simple_server import run
> to
> from quixote.server.scgi_server import run
>
> I can use
>
> lynx http://localhost/abc 
> to access the demo page,
> And the helloworld page can be displayed correctly at:
>
> http://localhost/abc/hello 
>
> in fact, The 'abc' can be replaced by any string,
> when access lynx
> http://localhost/abc  That's weird!
> But when I use
>
> lynx http://localhost/ 
> I got the following error,
>
> "Data transfer complete
> HTTP/1.0 301 Moved Permanently
>
> lynx: Start file could not be found or is not text/html or text/plain
>       Exiting...
> "
>
>
> scgi_mini_demo.py
> *****************************************************
>
> from quixote.publish import Publisher
> from quixote.directory import Directory
>
> class RootDirectory(Directory):
>
>     _q_exports = ['', 'hello']
>
>
>     def _q_index(self):
>         return '''
>                     Welcome to the Quixote demo.  Here is a
>                     link.
>                     
>
>                   
>                 '''
>
>     def hello(self):
>         return 'Hello world!'
>
>
> def create_publisher():
>     return Publisher(RootDirectory(),
>
>                      display_exceptions='plain')
>
>
> if __name__ == '__main__':
>     from quixote.server.scgi_server import run
>     print 'creating demo listening on
> http://localhost:3000/' 
>     run(create_publisher, host='localhost', port=3000)
>
> **************************************************************
>
> I don't think that's related to the http server,
>
> Anyway I'm using lighttpd and the config file is like:
>
> $HTTP["url"] !~ "^/static/" {
>   scgi.server = (
>                   "/" => ( "
> 127.0.0.1" =>
>                       (
>                         "host" => "127.0.0.1",
>                         "port" => 3000,
>                         "check-local" => "disable"
>
>                       )
>                     )
>                 )
> }
>
>
> Anybody can help me out? Thanks a bunch!
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users
>


--
William: http://www.opensource4you.com

reply