Zope
  Home arrow Zope arrow Page 5 - Using Zope With Apache
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ZOPE

Using Zope With Apache
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 30
    2002-05-14

    Table of Contents:
  • Using Zope With Apache
  • A Few Good Reasons
  • When Persistence Pays Off
  • The Writing On The Wall
  • The Fast And The Furious
  • Performing By Proxy
  • Zip Zap Zoom

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    PCmover - $15 Off with Coupon Code CJPH7Q

    Using Zope With Apache - The Fast And The Furious
    (Page 5 of 7 )

    Now, while the procedure on the previous page does seem to work in somecases (at least according to all the documentation I read and some ofthe posts in the online newsgroups), I have to admit that, despite mybest efforts, I was unable to get the URL rewriting to work correctly onmy system. If you had the same problem, then be of stout heart, becausethere does exist an alternative solution.

    This alternative is FastCGI, which works just as well, and is mucheasier to install and use. First, untar the Apache distribution to adirectory on your system.

    $ cd /tmp/sources $ tar -xzvf apache_1.3.20.tar.gz
    Next, untar the FastCGI distribution

    $ tar -xzvf mod_fastcgi-2.2.12.tar.gz
    and move the contents of the newly-created directory to<apache-source>/src/modules/fastcgi

    $ mv mod_fastcgi-2.2.12 apache_1.3.20/src/modules/fastcgi/
    Configure Apache to activate this FastCGI module.

    $ cd /tmp/sources/apache_1.3.20 $ ./configure --activate-module=src/modules/fastcgi/libfastcgi.a
    In case you're wondering, no, there isn't an error in the line above -the file "libfastcgi.a" doesn't exist at the moment, but it will soon.

    Compile and install the package.

    $ make $ make install
    At this point, you can verify that the FastCGI module has been compiledinto the server by executing the httpd binary with the "-l" parameter(look for the entry "mod_fastcgi.c" in the resulting output)

    Next, configure Apache so that it knows how to handle FastCGI. Pop openApache's "httpd.conf" file and add the following lines to it:

    FastCgiExternalServer /usr/local/apache/htdocs/zope -host localhost:8889 -pass-header Authorization <Location /zope> SetHandler fastcgi-script </Location>
    The FastCgiExternalServer directive defines the file"/usr/local/apache/htdocs/zope" as a FastCGI application, one that willbe started and stopped manually. It also means that any request for thisfile from a client browser will automatically be handled by FastCGI.

    The "-pass-header Authorization" argument to the FastCgiExternalServerdirective instructs Apache to pass authentication information to theFastCGI application; this will (hopefully) solve the authenticationproblems experienced with PCGI.

    Now, shift the action over to Zope. You'll need to start Zope with acouple of additional configuration parameters, so that it knows it needsto use FastCGI. Here's how:

    $ cd /usr/local/Zope/ $ ./bin/python z2.py -D -F 8889
    This tells Zope to use FastCGI, and to run on port number 8889. If you'dprefer to use a UNIX domain socket instead of a TCP port, you canreplace the port number with the path to the socket.

    Zope should now start and run silently in the foreground.

    Finally, start Apache.

    $ /usr/local/apache/bin/apachectl start
    At this point, you should be able to browse to the URLhttp://your.server/zope/ and view the Zope screens. All content underthe /zope/ "directory" will be served up by Zope; all other content willbe served by Apache.

    You'll notice, also, that if you go to the Zope management interface, athttp://your.server/zope/manage/, you'll have no trouble logging in (solong as you have the right credentials). Thus, FastCGI very neatlysolves the authentication problem PCGI had - and that's why I'drecommend this approach over the previous one.

    More Zope Articles
    More By icarus, (c) Melonfire


     

       

    ZOPE ARTICLES

    - Creating Zope Products
    - Plone Content Types With Archetypes
    - Flat User Management in Zope
    - Creating Basic Zope Applications
    - Getting started with Zope for Linux and Sola...
    - ZPT Basics (part 4)
    - ZPT Basics (part 3)
    - ZPT Basics (part 2)
    - ZPT Basics (part 1)
    - Exception Handling In DTML
    - DTML Basics (part 4)
    - DTML Basics (part 3)
    - DTML Basics (part 2)
    - DTML Basics (part 1)
    - Using Zope With Apache

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway