[Zope] [Fwd: Zope Question]

Martijn Pieters mj@digicool.com
Tue, 26 Sep 2000 21:43:19 +0200


On Tue, Sep 26, 2000 at 12:14:19PM -0400, Ryan Booz wrote:
> I'm posting this question here because I know a while back some people
> had mentioned they were using Zope.  I'm trying to start using it,
> getting used to the DTML and all the other stuff.  I can get it running
> with my Apache server, and that's all well and good.  But I have these
> two questions which I can't seem to find answers to in current Zope
> documents and help.
> 
> 1.  How do I get the server process to run as a daemon?  I've tried the
> one script for an rc process I found on a site, but my server just hangs
> and I never get a command prompt back.  All other processes I've ever
> run at startup are either designed to be daemons, or have a specific
> switch to add to the program name.

Out of the box Zope starts up in debug mode. Remove the -D flag from the
start script (aptly named 'start') and you'll be dandy. Run 'python z2.py
-h' for more startup options.

> 2.  OK, this is kind of two part.  First, where does Zope actually store
> all of the directories and files you create for a site.  If I have a
> fake directory as the "trigger" for the persistent CGI process, than
> where does it actually store this pages I'm creating?  As an example,
> following the install instructions that comes with Zope, I've set Apache
> to send every request for /zope to the FastCGI process running in the
> background.  That directory does not exist in my htdocs directory.
> Where is this stuff going?

The Apache server can do much more than serving HTML pages form a disk.
Using FastCGI, Apache runs all requests starting with the /zope URL
throuhg FastCGI, which returns not HTML files but the results of the
REQUEST passed through to the Zope server. No file system has a look in on
that process.

In fact, you can run Zope without Apache as well. If you didn't touch the
z2.py startup parameters, then you can point your browser at port 8080 of
you server and see your Zope server there.

Now, do you ask, where does Zope get's it's pages from? You still don't
see a directory... Zope doesn't serve files, but Objects. (You may want to
read up on Object Oriented theory here, there is some good intro material
on Zope.org as well). These objects are stored in a Object Database, the
ZODB. The default storage is in a file called Data.fs, which you'll find
in the var subdirectory. Nuke that file and you have lost all your
objects.

>     Two, can I get Zope to answer the general requests for a site (like
> www.bms.school my internal server and fake domain.)  Rather than having
> to specify a directory, it would just send all requests to Zope.  But to
> take that one step further, if I had user accounts set up with the
> /~username convention, would this stuff be able to pass through Zope and
> actually go to those directories?  I don't think I'm making this
> question clear, but I don't know how else to state it right now.

Zope doesn't serve files, at least not out of the box. There is a product
called LocalFS that may help you accomplish this with just Zope.

You can also use Apache with some Rewrite rules to combine the
'namespaces' into one; / is Zope, but /~username is a subdirectory of a
homedirectory. Again, there are several How-To's on Zope.org that will
help you with this.

Hope this helps!

-- 
Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------