MoinMoin

www/moinmoin

Set up MoinMoin on FreeBSD

  1. Install Nginx and uWSGI.

  2. Install MoinMoin from ports as described in the MoinMoin on FreeBSD with Apache tutorial:

    cd /usr/ports/www/moinmoin
    make install
    make MOINTYPE=WSGI instance
  3. Put the following under /usr/local/etc/nginx/nginx.conf:

    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
    
        keepalive_timeout  65;
    
        server {
                listen 80;
                server_name freebsd.waw.hackerspace.pl;
    
                location / {
                        uwsgi_pass unix:/var/run/moin.sock;
                        include uwsgi_params;
                }
    
                location ~ ^/moin_static[0-9]+/(.*) {
                        #alias /var/moin/static/$1;
                        alias  /usr/local/lib/python2.7/site-packages/MoinMoin/web/static/htdocs/$1;
    
                }
        }
    }
  4. /etc/rc.conf:

    uwsgi_enable="YES"
    uwsgi_configfile="/usr/local/www/wiki/uwsgi.ini"
    uwsgi_uid="www"
    uwsgi_gid="www"
    
    nginx_enable="YES"
  5. /usr/local/www/wiki/uwsgi.ini:

    [uwsgi]
    socket = /var/run/moin.sock
    chmod-socket = 660
    
    chdir = /usr/local/www/wiki
    wsgi-file = moin.wsgi
    
    master
    workers = 3
    max-requests = 200
    harakiri = 30
    die-on-term
  6. To try it out just start the services:
    service uwsgi start 
    service nginx start

    and open http://localhost/ in the browser.

References


CategoryHowTo CategoryPorts

Ports/www/moinmoin (last edited 2018-07-18T20:15:02+0000 by MateuszPiotrowski)