view wiki/server/ @ 49:cf52f97a5857

merge moin--main--1.3--patch-928 Patches applied: * Fix error handling on failure, improved error display * integrate new cgitb error handling * huge merge from main, fixing strange conflicts in and * cgitb refactoring * fixed cgitb import * merge from main * adding MOIN_DEBUG to server scripts * refacrot cgitb for eaiser customisation, use one view class in error with new simpler design, better error handling in multiconfig. * merge from main * Print simple text exception when cgitb fail from any reason * remove changes not related to error handling * raise more helpful error when there is no wikis list in * refactor getConfig, remove duplicate code, more correct error handling, use either farmconfig or wikiconfig mtime * more clear error message when data or underlay missing or have wrong privilages * update cgitb docstring * make cgitb easiter to customize, simplify error.ErrorView, print cgitb traceback after the original traceback. * refactoring multiconfig, make return values more clear, improving docstrings * use only preformatted text in printException * cgitb: improve code readability * merge from main * simplify the simple text traceback output * moved failure handling to new failure module (save imports for cgi) * spelling, docstring cleanup imported from: moin--main--1.5--patch-50
author Nir Soffer <>
date Thu, 29 Sep 2005 00:07:04 +0000
parents 77665d8e2254
children f37b49b6313d
line wrap: on
line source
    twisted.web based wiki server

    Run this server with mointwisted script on Linux or Mac OS X, or
    mointwisted.cmd on Windows.
    @copyright: 2004-2005 Thomas Waldmann, Oliver Graf, Nir Soffer
    @license: GNU GPL, see COPYING for details.

# System path configuration

import sys

# Path of the directory where is located.
sys.path.insert(0, '/path/to/wikiconfig')

# Path to MoinMoin package, needed if you installed with --prefix=PREFIX
# or if you did not use
## sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')

# Path to the directory where farmconfig is located (if different).
## sys.path.insert(0, '/path/to/farmconfig')

# Debug mode - show detailed error reports
## import os
## os.environ['MOIN_DEBUG'] = '1'

from MoinMoin.server.twistedmoin import TwistedConfig, makeApp

class Config(TwistedConfig):

    # Server name
    # Used to create .log, .pid and .prof files
    name = 'mointwisted'

    # Path to moin shared files (default '/usr/share/moin/wiki/htdocs')
    docs = '/usr/share/moin/htdocs'

    # The server will run with as this user and group (default 'www-data')
    user = 'www-data'
    group = 'www-data'

    # Port (default 8080)
    # To serve privileged port under 1024 you will have to run as root
    port = 8080

    # Interfaces (default [''])
    # The interfaces the server will listen to. 
    # [''] - listen to all interfaces defined on the server
    # ['', ''] - listen to some
    # If '' is in the list, other ignored.
    interfaces = ['']

    # How many threads to use (default 10, max 20)
    # The more threads you use, the more memory moin uses. All thread
    # use one CPU, and will not run faster, but might be more responsive
    # on a very busy server.
    threads = 10

    # Set logfile name (default commented)
    # This is the *Apache compatible* log file, not the twisted-style logfile.
    # Leaving this as None will have no Apache compatible log file. Apache
    # compatible logfiles are useful because there are quite a few programs
    # which analyze them and display statistics.
    ## logPath = 'mointwisted.log'

    # Memory profile (default commented)
    # Useful only if you are a developer or interested in moin memory usage
    ## from MoinMoin.util.profile import TwistedProfiler
    ## memoryProfile = TwistedProfiler('mointwisted',
    ##                            requestsPerSample=100,
    ##                            collect=0)
    # Hotshot profile (default commented)
    # Not compatible with threads.
    ## hotshotProfile = name + '.prof'

# Create the application
application = makeApp(Config)