[Zope] Re: Redirecting to an "under construction" page
Yves Moisan
ymoisan at smnetcom.com
Wed Dec 10 08:57:41 EST 2003
This is also an interesting solution when Zope is down. There could
certainly be a watch script to detect a dead Zope and automatically
switch to the simple server. In that case, redirection may be towards a
"Server busy" or "Try to connect later" page, which could be
accomplished by passing part of the 'message' variable as an argument to
the script proposed by Dennis (e.g instead of hard-coding the <h1>
and/or <h2> text in 'message').
Thanx for the idea!
Paul Howell wrote:
> Thanks Dennis. I dunno whether I'd call it simpler, but it would
> definitely be useful in some cases. It certainly is satisfying to take
> advantage of python's libraries to make a server-from-scratch when one
> is called for.
> =Pual
>
> At 12:47 PM 12/9/2003, you wrote:
>
>> There's another, simpler approach. Write a simple server and use it
>> rather than Zope. YMMV depending upon your site configuration.
>>
>> Something like this should do the job...
>>
>> #!/usr/bin/env python2
>>
>> import SimpleHTTPServer
>> import SocketServer
>> import StringIO
>> <snip a lot>
>> httpd = SocketServer.TCPServer(("", PORT), Handler )
>> print 'serving at port ', PORT
>> httpd.serve_forever()
>
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list