durusmail: quixote-users: Overlaying a static directory
Overlaying a static directory
2005-04-11
2005-04-12
2005-04-12
2005-04-12
2005-04-13
2005-04-13
2005-04-14
2005-04-14
2005-04-14
2005-04-14
2005-04-14
2005-04-14
2005-04-14
2005-04-14
2005-04-14
2005-04-14
David Binger (3 parts)
2005-04-14
2005-04-14
2005-04-13
2005-04-14
2005-04-14
2005-04-13
SCGI util.
2005-04-12
2005-04-13
2005-04-13
2005-04-13
2005-04-13
Overlaying a static directory
mso@oz.net
2005-04-13
Neil Schemenauer wrote:

>> Apache1 logs almost the same thing:
>> [Tue Apr 12 17:01:53 2005] [error] [client 127.0.0.1] scgi: error reading
>> response headers
>
> That's strange.  What OS are you using?  If you can, try recording the
Apache<->SCGI server coversation using tcpdump.  For example, if your
SCGI server is listening on port 3000, as root run:
>
>     # tcpdump -i lo -s 9000 -w capture.dat port 3000
>
> After tcpdump is running then try reloading the page in your browser to
provoke the problem.  Use Control-C to stop capturing.  If you send me
the capture file then I will take a look at it.

I sent the tcpdump files privately to Neil.  If anyone wants a copy, let
me know.  Here's how they were built:

1) /var/www/localhost/htdocs is Apache's document root (Apache 2.0.52 on
Linux Gentoo).  Copied index.html.en to index.html.  It displays
apache_pb.png.

1) Modify Quixote 2.0a5 demo (root.ptl).  In class RootDirectory add:

    apache = StaticDirectory("/var/www/localhost/htdocs/",
        follow_symlinks=True, index_filenames=["index.html"],
        list_directory=True)

    Add 'apache' to ._q_exports.

2) Start the demo SCGI server:
python ~/lib/python/quixote/server/scgi_server.py
--script-name=/shields-beta --max-children=1 --host=localhost --port=3000

3) Apache config has:


        Options Indexes
        Order Allow,deny
        Allow from all
        AddDefaultCharset iso-8859-1
        SCGIServer localhost:3000
        SCGIHandler On


4) Start "tcpdump -i lo -s 9000 -w /tmp/good.dat port 3000".  Go to
http://xxx.xxx.xxx.xxx/shields-beta/apache/ in browser.  Quit tcpdump.
(Using http instead of https, unlike my other examples.  Sending the
request to my Ethernet IP to avoid mixing it with the inter-server traffic
on the loopback.)

5) Start tcpdump to /tmp/reload.dat .  Press Reload in browser.  Internal
Server Error appears in browser.  Quit tcpdump.

6) Start tcpdump to /tmp/reload2.dat .  Press Reload in browser.  Page
appears without the image.  Quit tcpdump.

7) Start tcpdump to /tmp/zfinal.dat.  Press Enter in browser's address
box.  Image reappears in page.  Quit tcpdump.

The SCGI server doth spit out the following at me during (4)-(7), using
the Publisher patch I posted yesterday:

=================================================
===> Response [10798] started 2005-04-13 15:40:48.497818
===> From 161.55.66.227
===> Request /shields-beta/apache/
===> Status 200 OK
{'last-modified': 'Wed, 13 Apr 2005 00:00:33 GMT'}
===> Body is 1456 bytes
===> Response [10798] finished 2005-04-13 15:40:48.499855
+++++++++++++++++++++++++++++++++++++++++++++++++
=================================================
===> Response [10798] started 2005-04-13 15:40:48.518169
===> From 161.55.66.227
===> Request /shields-beta/apache/apache_pb.gif
===> Status 200 OK
{'last-modified': 'Tue, 02 Nov 2004 18:29:18 GMT'}
===> Content-type is image/gif
===> Response [10798] finished 2005-04-13 15:40:48.518461
+++++++++++++++++++++++++++++++++++++++++++++++++
=================================================
===> Response [10798] started 2005-04-13 15:41:00.788479
===> From 161.55.66.227
===> Request /shields-beta/apache/
===> Status 200 OK
{'last-modified': 'Wed, 13 Apr 2005 00:00:33 GMT'}
===> Body is 1456 bytes
===> Response [10798] finished 2005-04-13 15:41:00.788840
+++++++++++++++++++++++++++++++++++++++++++++++++
=================================================
===> Response [10798] started 2005-04-13 15:41:06.835861
===> From 161.55.66.227
===> Request /shields-beta/apache/
===> Status 200 OK
{'last-modified': 'Wed, 13 Apr 2005 00:00:33 GMT'}
===> Body is 1456 bytes
===> Response [10798] finished 2005-04-13 15:41:06.836147
+++++++++++++++++++++++++++++++++++++++++++++++++
=================================================
===> Response [10798] started 2005-04-13 15:41:06.866162
===> From 161.55.66.227
===> Request /shields-beta/apache/apache_pb.gif
===> Status 200 OK
{'last-modified': 'Tue, 02 Nov 2004 18:29:18 GMT'}
===> Content-type is image/gif
===> Response [10798] finished 2005-04-13 15:41:06.866437
+++++++++++++++++++++++++++++++++++++++++++++++++
=================================================
===> Response [10798] started 2005-04-13 15:41:30.638398
===> From 161.55.66.227
===> Request /shields-beta/apache/apache_pb.gif
===> Status 200 OK
{'last-modified': 'Tue, 02 Nov 2004 18:29:18 GMT'}
===> Content-type is image/gif
===> Response [10798] finished 2005-04-13 15:41:30.638697
+++++++++++++++++++++++++++++++++++++++++++++++++


-- Mike Orr 


reply