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

Benedict Verheyen benedict.verheyen at gmail.com
Thu May 24 10:37:15 EDT 2007


Benedict Verheyen schreef:
> 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

One little issue that i'm trying to find out is that if i enable
virtual hosts in my Apache config, then the wiki doesn't find it's 
static files (jpg's, css and so on) anymore. Without the virtual host, 
it's fine.
The only virtual host config i have is from a django site i also have on 
this server. Seems rather strange to me.

<VirtualHost *>
     ServerName djangoprogram
     SetEnv DJANGO_SETTINGS_MODULE djangoprogram.settings
     SetHandler mod_python
     PythonHandler django.core.handlers.modpython
     PythonPath "[r'E:\Sites\sitesdjango', 
r'E:\Sites\sitesdjango\djangoprogram'] + sys.path"
     PythonDebug On
     Alias /media "E:/Sites/sitesdjango/djangoprogram/media"
     <Location "/djangoprogram/">
     SetHandler None
     </Location>
</VirtualHost>

I haven't found yet what causes this.

Regards,
Benedict





More information about the Moin-user mailing list