4077
Comment:
|
4192
Formatting
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from Infrastructure/Wiki | |
Line 8: | Line 9: |
La wiki è gestita da MoinMoin 1.9.8 in esecuzione su FreeBSD 10.2 | La wiki è gestita da MoinMoin 1.9.8 in esecuzione su FreeBSD 10.2. |
Line 70: | Line 71: |
{{{ | {{{#!highlight bash |
Line 76: | Line 77: |
{{{ | {{{#!highlight makefile |
Line 100: | Line 101: |
{{{ | {{{#!highlight nginx |
Line 156: | Line 157: |
{{{ | {{{#!highlight ini |
Wiki
Installazione
La wiki è gestita da MoinMoin 1.9.8 in esecuzione su FreeBSD 10.2. La seguente documentazione fa riferimento a tale configurazione, ciononostante il setup è facilmente riproducibile.
Si danno per scontati:
- un sistema host già in esecuzione;
- un filesystem pronto ad ospitare jail;
- una instanza di Nginx all'interno di una jail configurato e in esecuzione.
È consigliato avere uno snapshot aggiornato dell'archivio dei ports prima di procedere.
Installazione della jail
/etc/jail.conf
exec.start = "/bin/sh /etc/rc"; exec.stop = "/bin/sh /etc/rc.shutdown"; exec.clean; host.hostname = "$host.oikia.unit.macaomilano.org"; path = "/usr/local/jails/$host"; mount.fstab = "/etc/jail.fstab.d/$host.fstab"; http-proxy { interface = "re0"; ip4.addr = "re0|10.1.1.3/24"; $host = "http-proxy"; allow.mount.devfs; allow.mount.procfs; mount.devfs; mount.procfs; enforce_statfs = 1; } unit_moinmoin { interface = "re0"; ip4.addr = "re0|10.1.1.9/24"; $host = "unit_moinmoin"; allow.mount.devfs; allow.mount.procfs; mount.devfs; mount.procfs; enforce_statfs = 1; }
/etc/jail.fstab.d/unit_moinmoin.fstab
/usr/ports /usr/local/jails/unit_moinmoin/usr/ports nullfs ro 0 0
/usr/local/jails/unit_moinmoin/etc/rc.conf
/usr/local/jails/unit_moinmoin/etc/make.conf
Configurazione del reverse proxy nginx
/usr/local/jails/http-proxy/var/www/robots.txt
User-agent: * Disallow: /
/usr/local/jails/http-proxy/usr/local/etc/nginx/sites-available/wiki.unit.macaomilano.org.conf
1 server {
2 listen 80;
3 server_name wiki.unit.macaomilano.org;
4 return 301 https://$server_name$request_uri;
5 }
6
7 server {
8 listen 443 ssl;
9 server_name wiki.unit.macaomilano.org;
10
11 access_log /var/log/nginx/wiki.unit.macaomilano.org-access.log;
12 error_log /var/log/nginx/wiki.unit.macaomilano.org-error.log error;
13
14 ssl on;
15 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
16 ssl_prefer_server_ciphers on;
17 ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
18 ssl_session_cache shared:SSL:5m;
19 ssl_session_timeout 5m;
20 ssl_dhparam /path/to/dhparam.pem;
21 ssl_certificate /path/to/unit.macaomilano.org-bundle.pem;
22 ssl_certificate_key /path/to/unit.macaomilano.org.key;
23
24 location / {
25 uwsgi_pass 10.1.1.9:9000;
26 include uwsgi_params;
27 }
28
29 location = /robots.txt {
30 alias /var/www/robots.txt;
31 }
32 }
Installazione di moinmoin
/usr/local/jails/unit_moinmoin/usr/local/etc/uwsgi.ini
1 jexec unit_moinmoin "service uwsgi start"