Thanks for help from William
I'm reporting back the solution to my scgi problem
The trick is very simple:
add script_name="" when calling scgi_server.run()
e.g. scgi_server.run(dome.create_publisher,port=3000,script_name="")
Tom
On 2/10/06, Tom Lesters <[EMAIL PROTECTED]> wrote:
Hi,
I just installed Quixote 2.4 and SCGI 1.9 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 uselynx 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 '''<html>
<body>Welcome to the Quixote demo. Here is a
<a href=""> </body>
</html>
'''
def hello(self):
return '<html><body>Hello world!</body></html>'
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 [email protected] http://mail.mems-exchange.org/mailman/listinfo/quixote-users
