Le seguenti 184 parole non sono state trovate nel dizionario di 1275 termini (includendo 1275 LocalSpellingWords) e sono evidenziate qui sotto:
0rc1   absolute   Alias   allows   Apache   apache   appears   Basic   basic   be   before   below   building   but   called   can   Changes   check   comment   conf   config   configuratin   configuration   configurations   Configure   configure   Configuring   configuring   consult   Contents   convert   correctly   Creation   css   current   daemon   Daemon   daemonname   daemons   default   defined   definition   development   dir   directive   documentation   does   done   easy   environment   everything   find   for   from   group   Group   homepage   htdocs   httpd   icons   ie   if   If   insert   installation   installed   Installing   Instance   instance   instructions   into   invoke   its   Its   js   just   later   library   line   Load   log   look   main   Make   make   match   maximum   maybe   Mod   mod   mode   module   Module   modules   modwsgi   Most   my   mywiki   need   note   now   On   on   only   operating   or   over   package   page   path   paths   people   Please   prefer   preferred   prefix   problems   process   Process   processes   python   rather   reason   recommended   reflect   remove   requests   restart   Restart   root   run   running   same   sample   section   See   ser   servername   Set   share   should   shown   so   some   somegroup   someuser   source   starts   static160   successfully   sure   sys   system   Table   than   that   their   then   these   this   This   threads   to   transition   umask   under   underlay   up   use   user   usr   var   ver   virtualhost   way   we   Why   wikiconfig   will   With   with   work   works   wsgi  

Nascondi questo messaggio
Italiano English
Locked History Actions

HelpOnInstalling/ApacheWithModWSGI

Why use mod_wsgi?

See the mod_wsgi homepage.

(!) Please note that its "daemon mode" should be the preferred way to use it (and this is the reason to prefer mod_wsgi over mod_python).

Basic configuring

  1. Install mod_wsgi
  2. Set up a wiki instance
  3. Edit wikiconfig.py

  4. Changes to Apache configuration
  5. Restart Apache

The sample configurations below are for a wiki instance called mywiki installed in a directory /var/www/moin/mywiki with the main MoinMoin installation installed in python's default site library path. The wiki appears as URL /mywiki under the server - ie http://my.ser.ver/mywiki. You will need to change these to reflect your installation.

Install mod_wsgi

Most people will just add a mod_wsgi package to their current operating system installation. If you are building from source then you should consult the mod_wsgi documentation (it is rather easy if you have a development environment installed).

Make sure you have this line in your apache configuration or mod_wsgi will not work:

LoadModule wsgi_module modules/mod_wsgi.so

After this restart Apache and make sure that it starts successfully (also check the the error log).

Set up a wiki instance

This is done as shown in WikiInstanceCreation. Its recommended to first configure the wiki with cgi and check that it works, then change the configuratin to use mod_wsgi. This allows you be sure that any problems are in the mod_wsgi transition rather than the basic MoinMoin installation.

  1. Copy moin.cgi into your wiki directory
  2. Configure httpd.conf as cgi first:

    • Alias /moin_static160/ "/usr/share/moin/htdocs/"
      ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"

Restart Apache and make test that your wiki works.

Edit `wikiconfig.py`

Make sure you use only absolute paths:

data_dir = '/var/www/moin/mywiki/data/'
data_underlay_dir = '/var/www/moin/mywiki/underlay/'

Test that the wiki works after this change.

Changes to Apache configuration

After your wiki is running as cgi script, convert it to run with mod_wsgi.

If you run your wiki as cgi as we recommended before, remove or comment the ScriptAlias directive:

#ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"

Add this to the same virtualhost definition:

    # this is for icons, css, js (and must match url_prefix from wiki config):
    Alias       /moin_static160/ /usr/share/moin/htdocs/

    # this is the URL http://servername/moin/ you will use later to invoke moin:
    WSGIScriptAlias /mywiki /var/www/moin/mywiki/moin.wsgi

    # create some wsgi daemons - use someuser.somegroup same as your data_dir:
    WSGIDaemonProcess daemonname user=someuser group=somegroup processes=5 threads=10 maximum-requests=1000
    # umask=0007 does not work for mod_wsgi 1.0rc1, but will work later

    # use the daemons we defined above to process requests!
    WSGIProcessGroup daemonname

Please also have a look into moin.wsgi - you maybe have to change some sys.path.insert instructions so Python can find the MoinMoin code and the wiki configuration.

Restart Apache - everything should now work correctly.

Configuring root wiki

See the same section on page HelpOnInstalling/ApacheWithModPython.