vincent delft wrote:

First sorry for question that sounds stupid...

I'm on gentoo with Apache 2.0.53, Quixote 2.0, scgi
1.2 and mod_scgi 1.2alpha1

I've adapted apache conf like:
<Location "/qx">
SetHandler scgi-handler
SCGIServer 127.0.0.1:3000
SCGIHandler On
Options -Multiviews
</Location>
(I think this is correctly taken into account because
if I replace the ":" by a blank I receive an error
message when I restart apache)



It's a colon with Apache 2 and a space with Apache 1.3. I found that out by trial and error a week ago.


I've tried with "/qx" and with "/", but with "/" I
receive the standard index.html of apache.



You tried what with "/". Going to it in the browser? That would be outside the <Location> scope. If you mean "<Location />", I would guess there's an undesired interaction happening with another part of the Apache config file. Maybe you have an overzealous RewriteRule or Alias somewhere. (Any RewriteRule should have option "[P]" to let other modules like SCGIHandler or Alias to operate on it; otherwise they will be bypassed.)


I'm running python server/scgi_server.py


But, I receive the following error:
"
[2005-04-24 22:05:22] exception caught
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/quixote/publish.py",
line 274, in process_request
output = self.try_publish(request)
File
"/usr/lib/python2.3/site-packages/quixote/publish.py",
line 249, in try_publish
assert path[:1] == '/'
AssertionError



I usually get that when the 'script_name' option in the SCGI server is different than the <Location> directive. They both have to be the same URL. You can set it as the script_name= argument to scgi_server.run(), or as the '--script-name=' command-line option to scgi_server.main().


As a correlate question:
"where to define the root path for a python object ?"
Where to say to Quixote that /qx must point to
quixote.demo.create_publisher ?



Look in quixote.server.scgi_server.main().

   default_factory = 'quixote.demo.create_publisher'
   parser.add_option(
       '--factory', dest="factory",
       default=default_factory,
       help="Path to factory function to create the site Publisher. "
            "(default=%s)" % default_factory)

Try this:

python server/scgi_server.py \
       --factory=quixote.demo.altdemo.create_publisher

PS: simple_server.py or medusa_server.py run perfectly.

The simple server automatically receives the correct 'SCRIPT_NAME' environment variable, as do the CGI server and FastCGI. For some reason mod_scgi cannot set 'SCRIPT_NAME' correctly so you have to help it. This is due to some peculiarity with Apache and mod_scgi that I don't understand.






_______________________________________________ Quixote-users mailing list [email protected] http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to