#format wiki #language it = Hacking MoinMoin = == Installazione == Si supponga che nginx sia già in esecuzione e che uwsgi sia già installato. Si suppone inoltre che nginx sia in esecuzione come utente `www`. Si scarichi la versione 1.9.8 di MoinMoin e la si estragga in una directory a scelta, in questo esempio `/usr/local/www/unit_moinmoin`. === Configurazione di uwsgi === Si salvi la configurazione di uwsgi per la wiki, ad esempio in `/usr/local/etc/uwsgi/unit_moinmoin.ini`. {{{#!highlight ini [uwsgi] socket = /tmp/unit_moinmoin.sock chmod-socket = 660 chdir = /usr/local/www/unit_moinmoin wsgi-file = moin.wsgi master workers = 2 max-requests = 200 harakiri = 30 die-on-term }}} Si avvii il demone con `uwsgi -T --ini /usr/local/etc/uwsgi/unit_moinmoin.ini`. === Configurazione di nginx === Aggiungere al blocco `server` desiderato la direttiva {{{ location / { uwsgi_pass /tmp/unit_moinmoin.sock; include uwsgi_params; } location = /favicon.ico { alias /usr/local/www/unit_moinmoin/static/favicon.ico; } location ~ ^/moin_static[0-9]+/(.*) { alias /usr/local/www/unit_moinmoin/static/$1; } }}} Quindi ricaricare la configurazione come usuale. === Configurazione di MoinMoin === {{{#!highlight python # Wiki identity ---------------------------------------------------- # Site name, used by default for wiki name-logo [Unicode] sitename = u'Unit' # Wiki logo. You can use an image, text or both. [Unicode] # For no logo or text, use '' - the default is to show the sitename. # See also url_prefix setting below! logo_string = u'MoinMoin Logo' % url_prefix_static # name of entry page / front page [Unicode], choose one of those: # a) if most wiki content is in a single language #page_front_page = u"MyStartingPage" # b) if wiki content is maintained in many languages page_front_page = u"FrontPage" # The interwiki name used in interwiki links #interwikiname = u'UntitledWiki' # Show the interwiki name (and link it to page_front_page) in the Theme, # nice for farm setups or when your logo does not show the wiki's name. #show_interwiki = 1 }}} ''(↓ da rivedere)'' {{{#!highlight python # Security ---------------------------------------------------------- # This is checked by some rather critical and potentially harmful actions, # like despam or PackageInstaller action: superuser = [u"crudo", ] # IMPORTANT: grant yourself admin rights! replace YourName with # your user name. See HelpOnAccessControlLists for more help. # All acl_rights_xxx options must use unicode [Unicode] acl_rights_before = u"crudo:read,write,delete,revert,admin EditorsGroup:read,write,delete,revert All:read" # The default (ENABLED) password_checker will keep users from choosing too # short or too easy passwords. If you don't like this and your site has # rather low security requirements, feel free to DISABLE the checker by: #password_checker = None # None means "don't do any password strength checks" # Link spam protection for public wikis (Uncomment to enable) # Needs a reliable internet connection. #from MoinMoin.security.antispam import SecurityPolicy }}}