[Moin-user] wiki farming and mod_python for multi lingual sites (SOLVED)

Benedict Verheyen benedict.verheyen at gmail.com
Wed May 23 03:46:36 EDT 2007


Benedict Verheyen schreef:
<snip>

Hi,


i'm still testing but i think this setup works concerning
farming with mod_python.

I installed moin moin with the prefix C:\moin
Sites located in E:/Sites/wikifarm.
Versions:
* Python 2.5.1
* MoinMoin 1.5.8
* mod_python 3.3.1
* Apache 2.2.4

Layout:
   E:/Sites/wikifarm
             |_ bin
             |_ config
                 |_ farmconfig.py
                 |_ wiki1.py
                 |_ wiki2.py
             |_ underlay
                 \_pages
             |_ wikis
                 \_ wiki1
                     \_ data
                 \_ wiki2
                     \_ data

In httpd.conf:
# Enable mod_python
LoadModule python_module modules/mod_python.so

DocumentRoot "E:/Sites/wikifarm"
Alias       /wikifarm     "C:/moin/share/moin/htdocs"

<Location /wiki1>
     SetHandler python-program
     # Add the path of your wiki directory
     PythonPath "[ 
'E:/Sites/wikifarm/config','C:/moin/lib/site-packages'] + sys.path"
     PythonHandler MoinMoin.request::RequestModPy.run
     PythonDebug On
</Location>

<Location /wiki2>
     SetHandler python-program
     # Add the path of your wiki directory
     PythonPath "[ 
'E:/Sites/wikifarm/config','C:/moin/lib/site-packages'] + sys.path"
     PythonHandler MoinMoin.request::RequestModPy.run
     PythonDebug On
</Location>


farmconfig.py
wikis = [
     ("wiki1",   r"^wikis.intranet.local/wiki1.*$"),
     ("wiki2",   r"^wikis.intranet.local/wiki2.*$"),
]
data_dir = './data/'
data_underlay_dir = 'E:/Sites/wikifarm/underlay/'
url_prefix = '/wikifarm'


wiki1.py
from farmconfig import FarmConfig
class Config(FarmConfig):
     sitename = u'Wiki 1' # [Unicode]
     interwikiname = 'WikiOne'
     page_front_page = u"FrontPage"
     data_dir = 'E:/Sites/wikifarm/wikis/wiki1/data'


wiki2.py
from farmconfig import FarmConfig
class Config(FarmConfig):
     sitename = u'Wiki 2' # [Unicode]
     interwikiname = 'WikiTwo'
     page_front_page = u"FrontPage"
     data_dir = 'E:/Sites/wikifarm/wikis/wiki2/data'

Regards,
Benedict





More information about the Moin-user mailing list