Table of Contents

Module: z2 Zope-2.2.1-src/z2.py

Zope 2 ZServer start-up file

Usage: %(program)s [options] [environment settings]

Options:

-h

Output this text.

-z path

The location of the Zope installation. The default is the location of this script, %(here)s.

-Z path

Unix only! This option is ignored on windows.

If this option is specified, a separate managemnt process will be created that restarts Zope after a shutdown (or crash). The path must point to a pid file that the process will record its process id in. The path may be relative, in which case it will be relative to the Zope location.

To prevent use of a separate management process, provide an empty string: -Z ''

-t n

The number of threads to use, if ZODB3 is used. The default is %(NUMBER_OF_THREADS)s.

-i n

Set the interpreter check interval. This integer value determines how often the interpreter checks for periodic things such as thread switches and signal handlers. The Zope default is 120, but you may want to experiment with other values that may increase performance in your particular environment.

-D

Run in Zope debug mode. This causes the Zope process not to detach from the controlling terminal, and is equivalent to supplying the environment variable setting Z_DEBUG_MODE=1

-a ipaddress

The IP address to listen on. If this is an empty string (e.g. -a ''), then all addresses on the machine are used. The default is %(IP_ADDRESS)s.

-d ipaddress

IP address of your DNS server. If this is an empty string (e.g. -d ''), then IP addresses will not be logged. If you have DNS service on your local machine then you can set this to 127.0.0.1. The default is: %(DNS_IP)s.

-u username or uid number

The username to run ZServer as. You may want to run ZServer as nobody or some other user with limited resouces. The only works under Unix, and if ZServer is started by root. The default is: %(UID)s

-P [ipaddress:]number

Set the web, ftp and monitor port numbers simultaneously as offsets from the number. The web port number will be number+80. The FTP port number will be number+21. The monitor port number will be number+99.

The number can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses.

Multiple -P options can be provided to run multiple sets of servers.

-w port

The Web server (HTTP) port. This defaults to %(HTTP_PORT)s. The standard port for HTTP services is 80. If this is a dash (e.g. -w -), then HTTP is disabled.

The number can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses.

Multiple -w options can be provided to run multiple servers.

-f port

The FTP port. If this is a dash (e.g. -f -), then FTP is disabled. The standard port for FTP services is 21. The default is %(FTP_PORT)s.

The port can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses.

Multiple -f options can be provided to run multiple servers.

-p path

Path to the PCGI resource file. The default value is %(PCGI_FILE)s, relative to the Zope location. If this is a dash (-p -) or the file does not exist, then PCGI is disabled.

-F path_or_port

Either a port number (for inet sockets) or a path name (for unix domain sockets) for the FastCGI Server. If the flag and value are not specified then the FastCGI Server is disabled.

-m port

The secure monitor server port. If this is a dash (-m -), then the monitor server is disabled. The monitor server allows interactive Python style access to a running ZServer. To access the server see medusa/monitor_client.py or medusa/monitor_client_win32.py. The monitor server password is the same as the Zope super manager password set in the access file. The default is %(MONITOR_PORT)s.

The port can be preeceeded by an ip address follwed by a colon to specify an address to listen on. This allows different servers to listen on different addresses.

Multiple -m options can be provided to run multiple servers.

-l path

Path to the ZServer log file. If this is a relative path then the log file will be written to the var directory. The default is %(LOG_FILE)s.

-r

Run ZServer is read-only mode. ZServer won't write anything to disk. No log files, no pid files, nothing. This means that you can't do a lot of stuff like use PCGI, and zdaemon. ZServer will log hits to STDOUT and zLOG will log to STDERR.

-L

Enable locale (internationalization) support. The value passed for this option should be the name of the locale to be used (see your operating system documentation for locale information specific to your system). If an empty string is passed for this option (-L ''), Zope will set the locale to the user's default setting (typically specified in the $LANG environment variable). If your Python installation does not support the locale module, the requested locale is not supported by your system or an empty string was passed but no default locale can be found, an error will be raised and Zope will not start.

-X

Disable servers. This might be used to effectively disable all default server settings or previous server settings in the option list before providing new settings. For example to provide just a web server:

%(program)s -X -w80

-M file

Save detailed logging information to the given file. This log includes separate entries for:

  • The start of a request, - The start of processing the request in an application thread, - The start of response output, and - The end of the request.

Environment settings are of the form: NAME=VALUE.

Note: you must use Python 1.5.2 or later!

Imported modules   
import ZLogger
from ZServer import resolver, logger, asyncore, zhttp_server, zhttp_handler, PCGIServer, FTPServer, FCGIServer, secure_monitor_server
import getopt
import os
import string
import sys
import zLOG
Functions   
server_info
set_locale
  server_info 
server_info (
        old,
        v,
        offset=0,
        )

Exceptions   
'Invalid port'
  set_locale 
set_locale ( val )

Exceptions   
SystemExit

Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6