From renato.pontefice at gmail.com Mon Apr 1 06:08:30 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Mon, 1 Apr 2019 12:08:30 +0200 Subject: [moin-user] how to use restructuredtext Message-ID: Hi, I've a MoinMoin 1.9.10 installed I'm wondering how can I use restructuredtext I've already installed docutils Do I have to change some config file? TIA Renato -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at sumpfralle.de Mon Apr 1 06:38:17 2019 From: lists at sumpfralle.de (Lars Kruse) Date: Mon, 1 Apr 2019 12:38:17 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: References: Message-ID: <20190401123817.7b465d16@erker.lan> Hello Renato, Am Mon, 1 Apr 2019 12:08:30 +0200 schrieb Renato Pontefice : > I've a MoinMoin 1.9.10 installed > I'm wondering how can I use restructuredtext what exactly is not working for you at the moment? Cheers, Lars From renato.pontefice at gmail.com Mon Apr 1 07:44:22 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Mon, 1 Apr 2019 13:44:22 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: <20190401123817.7b465d16@erker.lan> References: <20190401123817.7b465d16@erker.lan> Message-ID: I'm not sure It could rum. I've not configured the wiserver.py. Renato Il lun 1 apr 2019, 12:38 Lars Kruse ha scritto: > Hello Renato, > > > Am Mon, 1 Apr 2019 12:08:30 +0200 > schrieb Renato Pontefice : > > > I've a MoinMoin 1.9.10 installed > > I'm wondering how can I use restructuredtext > > what exactly is not working for you at the moment? > > Cheers, > Lars > _______________________________________________ > moin-user mailing list > moin-user at python.org > https://mail.python.org/mailman/listinfo/moin-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at sumpfralle.de Mon Apr 1 16:31:21 2019 From: lists at sumpfralle.de (Lars Kruse) Date: Mon, 1 Apr 2019 22:31:21 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: References: <20190401123817.7b465d16@erker.lan> Message-ID: <20190401223121.521527c3@erker.lan> Hello Renato, the difference between a non-configured rst formatting can be seen in the following two wikis: A) https://moinmo.in/HelpOnParsers/ReStructuredText/RstPrimer B) https://wiki.hack-hro.de/Workshops/Shell In (A) you see the message "Rendering of reStructured text is not possible, please install Docutils." and you can see the raw rst syntax in the rendering. In (B) you do not see the warning message and the text is rendered properly (there are lists and headlines). Cheers, Lars From renato.pontefice at gmail.com Tue Apr 2 02:52:37 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Tue, 2 Apr 2019 08:52:37 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: <20190401223121.521527c3@erker.lan> References: <20190401123817.7b465d16@erker.lan> <20190401223121.521527c3@erker.lan> Message-ID: yes, so, I just have to install Docutils and rendering is ok? Nothing else to do? The B) option use MoinMoin 1.9.x? Can I download it and pass it to readthedoc? Thank you Renato Il giorno lun 1 apr 2019 alle ore 22:31 Lars Kruse ha scritto: > Hello Renato, > > the difference between a non-configured rst formatting can be seen in the > following two wikis: > A) https://moinmo.in/HelpOnParsers/ReStructuredText/RstPrimer > B) https://wiki.hack-hro.de/Workshops/Shell > > In (A) you see the message "Rendering of reStructured text is not possible, > please install Docutils." and you can see the raw rst syntax in the > rendering. > > In (B) you do not see the warning message and the text is rendered properly > (there are lists and headlines). > > Cheers, > Lars > _______________________________________________ > moin-user mailing list > moin-user at python.org > https://mail.python.org/mailman/listinfo/moin-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From renato.pontefice at gmail.com Tue Apr 2 03:38:24 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Tue, 2 Apr 2019 09:38:24 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: References: <20190401123817.7b465d16@erker.lan> <20190401223121.521527c3@erker.lan> Message-ID: I've created this page (a simple one, just to understand) > > A ReStructuredText Primer > > ========================= > > >> :Author: Richard Jones > > :Version: $Revision: 1.17 $ > > :Copyright: This document has been placed in the public domain. > > >> .. contents:: > > >> >> The text below contains links that look like "(quickref__)". These > > are relative links that point to the `Quick reStructuredText`_ user > > reference. If these links don't work, please refer to the `master > > quick reference`_ document. > > >> __ > > .. _Quick reStructuredText: quickref.html > > .. _master quick reference: > > http://docutils.sourceforge.net/docs/user/rst/quickref.html > > >> >> Structure > > --------- > > But the rendering is not done! I see the same text not rendered! what's wrong? Renato Il giorno mar 2 apr 2019 alle ore 08:52 Renato Pontefice < renato.pontefice at gmail.com> ha scritto: > yes, > so, I just have to install Docutils and rendering is ok? > Nothing else to do? > > The B) option use MoinMoin 1.9.x? > Can I download it and pass it to readthedoc? > > Thank you > > > Renato > > Il giorno lun 1 apr 2019 alle ore 22:31 Lars Kruse > ha scritto: > >> Hello Renato, >> >> the difference between a non-configured rst formatting can be seen in the >> following two wikis: >> A) https://moinmo.in/HelpOnParsers/ReStructuredText/RstPrimer >> B) https://wiki.hack-hro.de/Workshops/Shell >> >> In (A) you see the message "Rendering of reStructured text is not >> possible, >> please install Docutils." and you can see the raw rst syntax in the >> rendering. >> >> In (B) you do not see the warning message and the text is rendered >> properly >> (there are lists and headlines). >> >> Cheers, >> Lars >> _______________________________________________ >> moin-user mailing list >> moin-user at python.org >> https://mail.python.org/mailman/listinfo/moin-user >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at sumpfralle.de Tue Apr 2 17:13:55 2019 From: lists at sumpfralle.de (Lars Kruse) Date: Tue, 2 Apr 2019 23:13:55 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: References: <20190401123817.7b465d16@erker.lan> <20190401223121.521527c3@erker.lan> Message-ID: <20190402231355.30cf03e2@erker.lan> Hello Renato, Am Tue, 2 Apr 2019 09:38:24 +0200 schrieb Renato Pontefice : > But the rendering is not done! > I see the same text not rendered! did you take a look at the documentation? https://moinmo.in/HelpOnParsers/ReStructuredText Specifically it mentions, that you need to wrap your text: {{{#!rst Some text ... }}} Lars From renato.pontefice at gmail.com Wed Apr 3 04:03:28 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Wed, 3 Apr 2019 10:03:28 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: <20190402231355.30cf03e2@erker.lan> References: <20190401123817.7b465d16@erker.lan> <20190401223121.521527c3@erker.lan> <20190402231355.30cf03e2@erker.lan> Message-ID: C:\moin-1.9\MoinMoin>pip install docutils DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that d ate. A future version of pip will drop support for Python 2.7. Requirement already satisfied: docutils in c:\python27\lib\site-packages (0.14) I''ve already read the page that you show me but, if docutil are installed, I should read the effect of rst markup. I show you a simple page I've already wrote and the result of it this is the source of very simple page: ---------------------------------------------------------------------------------------------------------------------------------------------- A ReStructuredText Primer ========================= The text below contains links that look like "(quickref__)". These are relative links that point to the `Quick reStructuredText`_ user reference. If these links don't work, please refer to the `master quick reference`_ document. __ Structure --------- This is the structure of bla bla bla ------------------------------------------------------------------------------------------------------------------------------------------------------- and this is the result: ------------------------------------------------------------------------------------------------------------------------------------------------------- A ReStructuredText Primer ========================= The text below contains links that look like "(quickref)". These are relative links that point to the Quick reStructuredText_ user reference. If these links don't work, please refer to the `master quick reference`_ document. Structure ------------------------------ This is the structure of bla bla bla ---------------------------------------------------------------------------------------------------------------------------------- the result is not what I want. I'm wondering if I need to tell that is restructuredtext somewhere or if it's enought have the docutils installed. Thank you Renato Il giorno mar 2 apr 2019 alle ore 23:14 Lars Kruse ha scritto: > Hello Renato, > > > Am Tue, 2 Apr 2019 09:38:24 +0200 > schrieb Renato Pontefice : > > > But the rendering is not done! > > I see the same text not rendered! > > did you take a look at the documentation? > https://moinmo.in/HelpOnParsers/ReStructuredText > > Specifically it mentions, that you need to wrap your text: > {{{#!rst > Some text ... > }}} > > Lars > _______________________________________________ > moin-user mailing list > moin-user at python.org > https://mail.python.org/mailman/listinfo/moin-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From renato.pontefice at gmail.com Wed Apr 3 04:49:26 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Wed, 3 Apr 2019 10:49:26 +0200 Subject: [moin-user] how to use restructuredtext In-Reply-To: References: <20190401123817.7b465d16@erker.lan> <20190401223121.521527c3@erker.lan> <20190402231355.30cf03e2@erker.lan> Message-ID: I think the problem is that my MoinMoin local instance, do not parse the code. I've just tried a very simple html page: -----------------------------------------------------------------------------------------

My First Heading

My first paragraph.

------------------------------------------------------------------------------------------ and, as result, I obtain the same text. So, I think the prob. is non restructuredtext, but in moinmoin that does not parse the code I've wrote on editor. maybe I need to set some option? If yes: wich one and where? Thank you Renato Il giorno mer 3 apr 2019 alle ore 10:03 Renato Pontefice < renato.pontefice at gmail.com> ha scritto: > C:\moin-1.9\MoinMoin>pip install docutils > DEPRECATION: Python 2.7 will reach the end of its life on January 1st, > 2020. Please upgrade your Python as Python 2.7 won't be maintained after > that d > ate. A future version of pip will drop support for Python 2.7. > Requirement already satisfied: docutils in c:\python27\lib\site-packages > (0.14) > > I''ve already read the page that you show me but, if docutil are > installed, I should read the effect of rst markup. > I show you a simple page I've already wrote and the result of it > > this is the source of very simple page: > > ---------------------------------------------------------------------------------------------------------------------------------------------- > A ReStructuredText Primer > ========================= > > The text below contains links that look like "(quickref__)". These > are relative links that point to the `Quick reStructuredText`_ user > reference. If these links don't work, please refer to the `master > quick reference`_ document. > > __ > > > Structure > --------- > This is the structure of bla bla bla > > ------------------------------------------------------------------------------------------------------------------------------------------------------- > > and this is the result: > > ------------------------------------------------------------------------------------------------------------------------------------------------------- > > A ReStructuredText Primer > ========================= > > The text below contains links that look like "(quickref)". These are > relative links that point to the Quick reStructuredText_ user reference. > If these links don't work, please refer to the `master quick reference`_ > document. > > Structure > ------------------------------ > > This is the structure of bla bla bla > > > ---------------------------------------------------------------------------------------------------------------------------------- > > > the result is not what I want. > > I'm wondering if I need to tell that is restructuredtext somewhere or if > it's enought have the docutils installed. > > > Thank you > > > Renato > > > Il giorno mar 2 apr 2019 alle ore 23:14 Lars Kruse > ha scritto: > >> Hello Renato, >> >> >> Am Tue, 2 Apr 2019 09:38:24 +0200 >> schrieb Renato Pontefice : >> >> > But the rendering is not done! >> > I see the same text not rendered! >> >> did you take a look at the documentation? >> https://moinmo.in/HelpOnParsers/ReStructuredText >> >> Specifically it mentions, that you need to wrap your text: >> {{{#!rst >> Some text ... >> }}} >> >> Lars >> _______________________________________________ >> moin-user mailing list >> moin-user at python.org >> https://mail.python.org/mailman/listinfo/moin-user >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From renato.pontefice at gmail.com Wed Apr 3 06:23:50 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Wed, 3 Apr 2019 12:23:50 +0200 Subject: [moin-user] moinmoin 1.9.10: how to configure wiki to use restructuredtext Message-ID: So, I think my prob is not in restructuredtext, but in every markup I use in MoinMoin. What I think is that I have to confire My MoinMoin to parse restructuredtext or HTML or creaole, or whatever I wanto. Where do I have to configure it? Thank you Renato -------------- next part -------------- An HTML attachment was scrubbed... URL: From renato.pontefice at gmail.com Wed Apr 3 06:58:20 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Wed, 3 Apr 2019 12:58:20 +0200 Subject: [moin-user] restructuredtext parser Message-ID: ok, I think I've understand wich parameter I have to change, to let moinmoin parse my restructuredtext . on the multiconfig.py, at line 1116, there is this line: ('default_markup', 'wiki', 'Default page parser / format (name of module in `MoinMoin.parser`)'), if I change default_markup value from wiki to html, I saw that moinmoin parse the html code. But I do not find the way to parse restructuredtext. I've tried with reST, RST and other. But I've never obtained result. What's the name of parameter? Thank you Renato -------------- next part -------------- An HTML attachment was scrubbed... URL: From renato.pontefice at gmail.com Thu Apr 4 06:19:57 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Thu, 4 Apr 2019 12:19:57 +0200 Subject: [moin-user] still prob with restructuredtext Message-ID: Hi, today , I've tried to watch, if my python installation is ok. Because I thought that the prob could be between python installation and MoinMoin. I mean: MoinMoin does not find the right module on the python installation. with the command , I've seen that docutils 0.14 is installed. So, maybe moinmoin does not know that. Can I check it? In the systeminfo page, I d'ont find any reference for restructuredtext. Does it mean that moinmoin does not know how to handle restructuredtext markup? And why? thank you Renato -------------- next part -------------- An HTML attachment was scrubbed... URL: From renato.pontefice at gmail.com Sat Apr 6 06:45:38 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Sat, 6 Apr 2019 12:45:38 +0200 Subject: [moin-user] Prob with cirtualenv Message-ID: Hi, I?m trying to install and use moin 1.9.x on my iMac with python wirtualenv. I?ve created a virtuale that use python 2.7 But when I try to install moin with the command Itook here: I receive the follow error: (moin) (python27) iMac-di-Renato:moin renato$ pip install moin Collecting moin Using cached https://files.pythonhosted.org/packages/db/c4/58872c31f3c242c2cec3a35f493628182979b664645858dafba4071b9cb5/moin-1.9.10.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/private/var/folders/yd/mcb18m1n3q1gb7rv4cc9hsxh0000gn/T/pip-install-gsh58_7y/moin/setup.py", line 68 def visit((prefix, strip, found), dirname, names): ^ SyntaxError: invalid syntax ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yd/mcb18m1n3q1gb7rv4cc9hsxh0000gn/T/pip-install-gsh58_7y/moin/ (moin) (python27) iMac-di-Renato:moin renato$ What?s up? Renato -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at sumpfralle.de Sat Apr 6 13:01:36 2019 From: lists at sumpfralle.de (Lars Kruse) Date: Sat, 6 Apr 2019 19:01:36 +0200 Subject: [moin-user] Prob with cirtualenv In-Reply-To: References: Message-ID: <20190406190136.3d1be25d@erker.lan> Hello Renato, Am Sat, 6 Apr 2019 12:45:38 +0200 schrieb Renato Pontefice : > I receive the follow error: > > (moin) (python27) iMac-di-Renato:moin renato$ pip install moin > Collecting moin > Using cached https://files.pythonhosted.org/packages/db/c4/58872c31f3c242c2cec3a35f493628182979b664645858dafba4071b9cb5/moin-1.9.10.tar.gz > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > File "", line 1, in > File "/private/var/folders/yd/mcb18m1n3q1gb7rv4cc9hsxh0000gn/T/pip-install-gsh58_7y/moin/setup.py", line 68 > def visit((prefix, strip, found), dirname, names): > ^ > SyntaxError: invalid syntax the above "tuple argument" ('(prefix, strip, found)') was only allowed in python2. It fails with the above error in python3. Thus somehow your virtualenv seems to use python3. At least I see no other reason, how the above error could appear. Cheers, Lars From renato.pontefice at gmail.com Mon Apr 8 03:42:10 2019 From: renato.pontefice at gmail.com (Renato Pontefice) Date: Mon, 8 Apr 2019 09:42:10 +0200 Subject: [moin-user] moin 1.9.10 does not recognize rst Message-ID: Hi, Im wrting from a windows pc where I've installed: - python 2.7.16 - docutils 0.14 -moinmoin 1.9.10 the version of python and docutils are from command (python --version>; pip freeze) so that are installed for sure. But if I try to create a rst pasge on moinmoin editor, I receive error on terminal and on the moinmoin page I obtain the following error:: _________________________________________________________________ Internal Server Error The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. ____________________________________________________________ I think it is a configuration error. Can someone show me a link where I can read how to set configuration for rst markup? Thank you Renato -------------- next part -------------- An HTML attachment was scrubbed... URL: From mscottreynolds at gmail.com Thu Apr 11 20:22:32 2019 From: mscottreynolds at gmail.com (M. Scott Reynolds) Date: Thu, 11 Apr 2019 18:22:32 -0600 Subject: [moin-user] Form input for MoinMoin 1.9? In-Reply-To: References: Message-ID: Is there a way for MoinMoin 1.9 to be configuered to accept form input, via GET, POST, or PUT requests and save it to something like a log file? I have an air quality sensor that I can configure to post weather data to a custom URL and I would love to be able to use my internal wiki at home to save the data. I know the sensor can reach the wiki as can see the wiki logging 404s in response to whatever the sensor is sending. I am ok with Python so if that is necessary I can do it. Thanks! Scott R. On Mon, Apr 8, 2019, 01:42 Renato Pontefice wrote: > Hi, > Im wrting from a windows pc where I've installed: > - python 2.7.16 > - docutils 0.14 > -moinmoin 1.9.10 > > the version of python and docutils are from command (python --version>; > pip freeze) so that are installed for sure. > But if I try to create a rst pasge on moinmoin editor, I receive error on > terminal and on the moinmoin page I obtain the following error:: > _________________________________________________________________ > Internal Server Error > > The server encountered an internal error and was unable to complete your > request. Either the server is overloaded or there is an error in the > application. > > ____________________________________________________________ > > > I think it is a configuration error. > > Can someone show me a link where I can read how to set configuration for > rst markup? > > > Thank you > > > Renato > > _______________________________________________ > moin-user mailing list > moin-user at python.org > https://mail.python.org/mailman/listinfo/moin-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mscottreynolds at gmail.com Thu Apr 11 20:24:11 2019 From: mscottreynolds at gmail.com (M. Scott Reynolds) Date: Thu, 11 Apr 2019 18:24:11 -0600 Subject: [moin-user] Form input for MoinMoin 1.9? In-Reply-To: References: Message-ID: Opps sorry didnt mean to tack on the original email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul at boddie.org.uk Fri Apr 12 06:43:51 2019 From: paul at boddie.org.uk (Paul Boddie) Date: Fri, 12 Apr 2019 12:43:51 +0200 Subject: [moin-user] Form input for MoinMoin 1.9? In-Reply-To: References: Message-ID: <1916856.AFEPpKmHvK@jeremy> On Thursday 11. April 2019 18.22.32 M. Scott Reynolds wrote: > Is there a way for MoinMoin 1.9 to be configuered to accept form input, via > GET, POST, or PUT requests and save it to something like a log file? Yes, since Moin can understand request parameters in order to interpret the query parameters in URLs or the values of form fields, it will be able to accept such requests. Typically, you would use an action to handle them, and there are a few in MoinMoin/action that might be informative. > I have an air quality sensor that I can configure to post weather data to a > custom URL and I would love to be able to use my internal wiki at home to > save the data. > > I know the sensor can reach the wiki as can see the wiki logging 404s in > response to whatever the sensor is sending. > > I am ok with Python so if that is necessary I can do it. I recommend starting off with a simple action, taking something like the bookmark action as an example. You will provide an execute function... def execute(pagename, request): ... ...and the request parameters will be provided via request.values as a mapping. The more difficult part will involve writing the information somewhere meaningful. If you just want to write to an arbitrary file, you can use normal Python functions to do that, although it might be interesting to write to a location within the wiki/data hierarchy. The MoinMoin.action.AttachFile module provides an interface to attachments, which could be one solution. You can also edit pages within actions and thus log things to pages. This will involve the MoinMoin.PageEditor.PageEditor class whose API is demonstrated by various actions. Finally, Moin tends to block "robots" making requests. This may not be a problem for you since you probably won't set a user agent string that matches one of the known robots, but it is worth remembering in case Moin rejects requests. Paul From niyalevi at gmail.com Mon Apr 15 22:10:51 2019 From: niyalevi at gmail.com (shadrock uhuru) Date: Tue, 16 Apr 2019 03:10:51 +0100 Subject: [moin-user] problems configuring moinmoin wikifarm Message-ID: hi everyone i am trying to install moinmoin as a wiki farm using nginx as the webserver on arch linux, the nginx is configured and i can acces the welcome page with https, i mainly followed the arch? wiki page for moinmoin' as arch wiki only gives configuration for a single? wiki instance i have also use information from other sources i would like to access the wiki farm at http://cleopatra.mydomain/moin/, e.g. http://cleopatra.mydomain/moin/wiki1 http://cleopatra.mydomain/moin/wiki2 when i go to the page? it returns Not Found

No wiki configuration matching the URL found!

the error logs show the server is trying to access file from /srv/nginx/html instead of from /srv/nginx/moin could someone look over everything i've done and point out where my errors are, i've included the config files i've changed and the bash script i used to configure the wiki. thanks shadrock =========== /var/log/nginx/error.log 2019/04/11 11:16:39 [error] 3020#3020: *1 open() "/srv/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.2.1.228, server: cleopatra.mydomain, request: "GET /favicon.ico HTTP/2.0", host: "cleopatra.mydomain" 2019/04/11 12:04:29 [error] 3020#3020: *3 open() "/srv/nginx/html/favicon.ico" failed (2: No such file or directory), client: 10.2.1.228, server: cleopatra.mydomain, request: "GET /favicon.ico HTTP/2.0", host: "cleopatra" =========== =========== /etc/nginx/nginx.conf http { ?? # Logging Settings ???? access_log /var/log/nginx/access.log; ??? ?error_log /var/log/nginx/error.log; ??? ??? index index.php index.html index.htm; ??? # include sites-enabled/*; # See Server blocks ??? ??? ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; ??? ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Redirect to HTTPS ??? server { ??????? listen 80; ??????? server_name cleopatra.mydomain; ??????? return 301 https://$host$request_uri; ??? } # HTTPS server ??? server { ??????? listen 443 ssl http2; # HTTP/2 is only possible when using SSL ??????? listen [::]:443 ssl http2; ??????? server_name cleopatra.mydomain; #??? ??? root /srv/nginx/html; ??????? ??????? ssl_certificate ssl/server.crt; ??????? ssl_certificate_key ssl/server.key; ??????? ssl_session_cache??? shared:SSL:1m; ??????? ssl_session_timeout? 5m; ??????? ??????? #error_page? 404????????????? /404.html; ??????? # redirect server error pages to the static page /50x.html ??????? # ??????? error_page?? 500 502 503 504? /50x.html; ??????? ??????? location = /50x.html { ??????????? root?? /srv/nginx/html; ??? ??? } ??????? location / { ??? ??? ??? root /srv/nginx/html; ??? ??? } ??? ??? location /moin/ { ??? ??? ? uwsgi_pass unix:/run/uwsgi/moin.sock; ??? ??? ? include /etc/nginx/uwsgi_params; ??? ??? } ??? ?? location ~ /moin/moin_static[0-9]+/(.*) { ??? ??? ? alias /srv/nginx/moin/static/htdocs/$1; ??? ??? } ??? ?? location /moin/favicon.ico { ??? ??? ? alias /srv/nginx/moin/static/htdocs/favicon.ico; ??? ??? }??? ?? ??? } }???? =========== =========== moin.wsgi ## included only changed parameters # -*- coding: iso-8859-1 -*- import sys, os sys.path.insert(0, '/srv/nginx/moin') from MoinMoin.web.serving import make_application application = make_application(shared='/srv/nginx/moin/static/htdocs') =========== =========== moinmoin_install.sh #!/bin/bash ## ./moinmoin.sh 2>&1 | tee moinmoin.debug . ../../conf/functions.sh INSTALLBASE=`pwd` SERVERBASE=/srv/nginx ## if restarting scripts disable active services for MYSERVICE in nginx moinmoin do ??? if systemctl status $MYSERVICE | grep --quiet 'active (running)'; then ??????? echo ??????? echo stopping $MYSERVICE service ??????? systemctl stop $MYSERVICE && systemctl disable $MYSERVICE ??? fi done pacman -S --needed nginx-mainline python2 ## alarm is a non privileged user /bin/su -c "aurman -S --needed moinmoin uwsgi-plugin-python2 perl-html-wikiconverter-moinmoin" - alarm # nginx ## from function.sh -- backup if no backup file found or restore backup file if found backup_restore_file "/etc/nginx/nginx.conf" systemctl enable nginx systemctl start nginx systemctl status nginx echo echo creating ssl keys echo mkdir -p /etc/nginx/ssl cd /etc/nginx/ssl openssl req -new -x509 -nodes -newkey rsa:4096 -keyout server.key -out server.crt chmod 400 server.key chmod 444 server.crt cd $INSTALLBASE ## use /srv/nginx as the server base cp -r /usr/share/nginx /srv/ chown -R http:http $SERVERBASE ## my nginx.conf cp ../nginx.conf /etc/nginx/nginx.conf echo echo checking nginx config file echo nginx -t WIKIFARM=$SERVERBASE/moin mkdir -p $WIKIFARM # Wikifarm creation mkdir -p $WIKIFARM/master # master wiki instance folder,? to be cloned later mkdir -p $WIKIFARM/users # where all the users data will be mkdir -p $WIKIFARM/cache #? where all the cache and sessions data will be cp /usr/share/moin/config/wikifarm/farmconfig.py? $WIKIFARM/ cp /usr/share/moin/config/wikifarm/mywiki.py? $WIKIFARM/master.py cp -R /usr/share/moin/data $WIKIFARM/master cp -R /usr/share/moin/underlay $WIKIFARM/master # static stuff like logos and themes will be placed here cp -Rp /usr/lib/python2.7/site-packages/MoinMoin/web/static? $WIKIFARM # create wiki instance folder and configuration from the master one ## include following section in farmconfig.py cat << EOF > /tmp/pat ##lab_public## ??? ("public", r"^http://cleopatra\.mydomain/moin/public/.*$"), ##lab_public!! ##lab_reserved## ??? ("reserved", r"^https?://cleopatra\.mydomain/moin/reserved/.*$"), ##lab_reserved!! EOF awk '/^wikis = /{print;f=1;next;}/^\]/{print;f=0;next;}f!=1{print}' $WIKIFARM/farmconfig.py | sed '/wikis = \[/r /tmp/pat' > /tmp/newfile mv /tmp/newfile $WIKIFARM/farmconfig.py rm /tmp/pat sed -i "s;#url_prefix_static = .*$;url_prefix_static = '$WIKIFARM/static/htdocs';" $WIKIFARM/farmconfig.py echo 'tz_offset = 1.0' >> $WIKIFARM/farmconfig.py cp -Rp $WIKIFARM/master/* $WIKIFARM/public # cp $WIKIFARM/master.py $WIKIFARM/public.py cp -Rp $WIKIFARM/master/* $WIKIFARM/reserved # cp $WIKIFARM/master.py $WIKIFARM/reserved.py for WIK in public reserved do ??? cat << EOF > $WIKIFARM/${WIK}.py # -*- coding: iso-8859-1 -*- from farmconfig import FarmConfig class Config(FarmConfig): ??? sitename = u'${WIK}' # [Unicode] ??? interwikiname = u'${WIK}' # [Unicode] ??? page_front_page = u"${WIK}_Start_Page" ??? data_dir = '$WIKIFARM/${WIK}/data/' ??? data_underlay_dir = '$WIKIFARM/${WIK}/underlay' EOF done #Uwsgi cp /usr/share/moin/server/moin.wsgi $WIKIFARM #sed -i 's/\(^.*SGIScriptAlias\).*$/#\1/' $WIKIFARM/moin.wsgi #sed -i "/^#.*WSGIScriptAlias/ a\WSGIScriptAlias /reserved $WIKIFARM/moin.wsgi" $WIKIFARM/moin.wsgi #sed -i "/^#.*WSGIScriptAlias/ a\WSGIScriptAlias /public $WIKIFARM/moin.wsgi" $WIKIFARM/moin.wsgi #sed -i 's/daemonname/moin/' $WIKIFARM/moin.wsgi #sed -i 's/user=someuser/user=http/' $WIKIFARM/moin.wsgi #sed -i 's/group=somegroup/group=http/' $WIKIFARM/moin.wsgi sed -i '/\/path\/to\/farmconfigdir/s/^#//' $WIKIFARM/moin.wsgi sed -i "s-/path/to/farmconfigdir-$WIKIFARM-" $WIKIFARM/moin.wsgi sed -i 's/application = make_application/s/shared=True/shared=False/' $WIKIFARM/moin.wsgi cat << EOF > $WIKIFARM/uwsgi.ini [uwsgi] socket = /run/uwsgi/moin.sock chmod-socket = 660 plugin = python2 chdir = $WIKIFARM/ wsgi-file = $WIKIFARM/moin.wsgi master workers = 3 max-requests = 200 harakiri = 60 die-on-term EOF # fix security on folders chown -R http:http $WIKIFARM chmod -R ug+rwX $WIKIFARM chmod -R o-rwx $WIKIFARM # service file for MoinMoin with uwsgi cat << EOF > /etc/systemd/system/moinmoin.service [Unit] Description=Start uwsgi for moinmoin wiki After=network.target [Service] Type=simple User=http ExecStart=/usr/bin/uwsgi --ini $WIKIFARM/uwsgi.ini [Install] WantedBy=multi-user.target EOF echo echo restarting services echo systemctl enable moinmoin systemctl start moinmoin systemctl restart nginx systemctl status nginx moinmoin echo echo creating wiki create/delete scripts echo cat << EOF > /usr/local/bin/create_wiki #!/bin/bash WIKIFARM=/srv/nginx/moin CONFIGFILE=/srv/nginx/moin/farmconfig.py CREATE='' echo echo the following wikis will be created echo "\$@" echo for NEWWIKI in "\$@" do ??? if grep -q \$NEWWIKI \$CONFIGFILE; then ??? ??? echo \$NEWWIKI exists in \$CONFIGFILE!! skipping creation ??? else ??? ??? cp -Rp \$WIKIFARM/master/* \$WIKIFARM/\$NEWWIKI #??? cp \$WIKIFARM/master.py \$WIKIFARM/\${NEWWIKI}.py cat << INNEREOF > \$WIKIFARM/\${NEWWIKI}.py # -*- coding: iso-8859-1 -*- from farmconfig import FarmConfig class Config(FarmConfig): ??? sitename = u'\${NEWWIKI}' # [Unicode] ??? interwikiname = u'\${NEWWIKI}' # [Unicode] ??? page_front_page = u"\${NEWWIKI}_Start_Page" ??? data_dir = '\$WIKIFARM/\${NEWWIKI}/data/' ??? data_underlay_dir = '\$WIKIFARM/\${NEWWIKI}/underlay' INNEREOF ??? ??? INTRO_BLOCK=" ##lab_\${NEWWIKI}## ??? ("\$NEWWIKI", r"^http://cleopatra\.mydomain/\$NEWWIKI/.*\$"), ##lab_\${NEWWIKI}!! " ??? #??? gawk -i inplace -v x="\$INTRO_BLOCK" '{print} /wikis = \[/{print x}' \$CONFIGFILE ??? ??? cat \$CONFIGFILE | awk -v x="\$INTRO_BLOCK" '{print} /wikis = \[/{print x}' > nefil && mv newfil \$CONFIGFILE ??? ??? CREATE='y' ??? fi done if "[\$CREATE" == 'y']; then ??? chown -R http:http \$WIKIFARM ??? chmod -R ug+rwX \$WIKIFARM ??? chmod -R o-rwx \$WIKIFARM ??? systemctl restart nginx moinmoin fi EOF chmod 744 /usr/local/bin/create_wiki cat << EOF > /usr/local/bin/delete_wiki #!/bin/bash WIKIFARM=/srv/nginx/moin CONFIGFILE=/srv/nginx/moin/farmconfig.py DELETE='' echo echo the following wikis will be deleted echo "\$@" echo read? -r -p "Are you sure? [y/N] " ANS if [[ "\$ANS" =~ ^(yes|y)\$ ]] then ??? for WIKINAME in "\$@" ??? do ??? ??? echo checking if \$WIKINAME wiki exist ??? ??? if [ -d \$WIKIFARM/\$WIKINAME ]; then ??? ??? ??? DELETE=Y ??? ??? ??? echo deleting $WIKINAME ??? ??? ??? rm -r \$WIKIFARM/$WIKINAME ??? ??? else ??? ??? ??? echo \$WIKIFARM/\$WIKINAME does not exist!! skipping ??? ??? fi ??? ??? if [ -e \$WIKIFARM/\${WIKINAME}.py ]; then ??? ??? ??? DELETE=Y??? ??? ??? ? ? rm \$WIKIFARM/\${WIKINAME}.py ??? ??? else ??? ??? ??? echo \$WIKIFARM/\${WIKINAME}.py does not exist!! skipping ??? ??? fi ??? ??? if grep -q \$WIKINAME \$CONFIGFILE; then ??? ??? ??? sed -i '/^##lab_'"\$WIKINAME"'##/,/^##lab_'"\$WIKINAME"'!!/d' \$CONFIGFILE ??? ??? ??? DELETE='Y' ??? ??? else ??? ??? ??? echo \$WIKINAME not found in \$CONFIGFILE!! skipping ??? ??? fi ??? done fi if ["\$DELETE" == 'Y']; then ??? systemctl restart nginx moinmoin fi EOF chmod 744 /usr/local/bin/delete_wiki echo echo moinmoin wiki installed echo ===========