From 4fcbb66b8713e00edf084ffbc2366dd24cd530e1 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Wed, 17 Apr 2013 16:05:51 +0200 Subject: [PATCH] Ajout : vm_hosted : etc/sympa/host.d/cyclocoop.org/ . --- etc/nginx/conf.d/fastcgi.conf | 2 +- etc/nginx/site.d/sympa/site.conf | 5 +- etc/nsd3/zone.d/cyclocoop.org.conf | 3 + etc/nsd3/zone.d/cyclocoop.org.zone.m4 | 77 ++++++++++++++++ .../sympa.heureux-cyclage.org/host.cfg | 4 +- etc/sv/mysql/configure.sh | 2 +- etc/sv/nsd3/configure.sh | 2 +- etc/sv/postfix/configure.sh | 2 +- etc/sv/postgres/configure.sh | 2 +- etc/sv/sympa/configure.sh | 4 +- etc/sympa/host.d/cyclocoop.org/robot.conf.m4 | 3 + .../host.d/heureux-cyclage.org/robot.conf.m4 | 1 - etc/sympa/transport | 4 +- etc/sympa/virtual_alias | 6 +- .../x509/sympa.heureux-cyclage.org/crl.pem | 26 +++--- .../crl.self-signed.pem | 26 +++--- .../x509/sympa.heureux-cyclage.org/crt+ca.pem | 62 ++++++------- .../sympa.heureux-cyclage.org/crt+crl.pem | 88 +++++++++--------- .../crt+crl.self-signed.pem | 90 +++++++++---------- .../x509/sympa.heureux-cyclage.org/crt.pem | 62 ++++++------- .../sympa.heureux-cyclage.org/crt.pem.asc | 26 +++--- .../crt.self-signed.pem | 64 ++++++------- .../crt.self-signed.pem.asc | 26 +++--- 23 files changed, 337 insertions(+), 250 deletions(-) create mode 100644 etc/nsd3/zone.d/cyclocoop.org.conf create mode 100644 etc/nsd3/zone.d/cyclocoop.org.zone.m4 create mode 100644 etc/sympa/host.d/cyclocoop.org/robot.conf.m4 diff --git a/etc/nginx/conf.d/fastcgi.conf b/etc/nginx/conf.d/fastcgi.conf index cf1f70e..72a1588 100644 --- a/etc/nginx/conf.d/fastcgi.conf +++ b/etc/nginx/conf.d/fastcgi.conf @@ -20,7 +20,7 @@ fastcgi_param REQUEST_METHOD $request_method; fastcgi_param REMOTE_USER $remote_user; fastcgi_param REQUEST_URI $request_uri; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; -fastcgi_param SCRIPT_FILENAME $request_filename; +fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_NAME $server_name; diff --git a/etc/nginx/site.d/sympa/site.conf b/etc/nginx/site.d/sympa/site.conf index 370514c..7fd9353 100644 --- a/etc/nginx/site.d/sympa/site.conf +++ b/etc/nginx/site.d/sympa/site.conf @@ -1,4 +1,4 @@ -server_name sympa.heureux-cyclage.org; +server_name sympa.heureux-cyclage.org sympa.cyclocoop.org; client_body_buffer_size 8k; client_max_body_size 10m; @@ -33,8 +33,9 @@ location / { fastcgi_ignore_headers Cache-Control Expires Set-Cookie; fastcgi_max_temp_file_size 2M; fastcgi_no_cache $no_cache; - fastcgi_param PATH_INFO $uri; fastcgi_param SCRIPT_NAME ''; + fastcgi_param SERVER_NAME $host; + fastcgi_param PATH_INFO $uri; fastcgi_pass_header Cookie; fastcgi_pass_header Set-Cookie; diff --git a/etc/nsd3/zone.d/cyclocoop.org.conf b/etc/nsd3/zone.d/cyclocoop.org.conf new file mode 100644 index 0000000..1abd23e --- /dev/null +++ b/etc/nsd3/zone.d/cyclocoop.org.conf @@ -0,0 +1,3 @@ +# NOTE: NS secondaire : ns6.gandi.net +#notify: 217.70.177.40 NOKEY +#provide-xfr: 217.70.177.40 NOKEY diff --git a/etc/nsd3/zone.d/cyclocoop.org.zone.m4 b/etc/nsd3/zone.d/cyclocoop.org.zone.m4 new file mode 100644 index 0000000..58f1018 --- /dev/null +++ b/etc/nsd3/zone.d/cyclocoop.org.zone.m4 @@ -0,0 +1,77 @@ +divert(-1) +dnl changecom(`;') + +* utilitaires M4 +define(`ALIAS', `define($1`_IP4', $2`'_IP4)') +define(`MAKE_GETTER', `define(`$1', $`'1`_'$`'0)') +MAKE_GETTER(`IP4') +MAKE_GETTER(`NAME') +define(`FQDN', `NAME($1).ZONE_DOMAIN') + +* hébergeur : exolia.fr +define(`EXOLIA_IP4', `91.121.51.125') +define(`EXOLIA_MX_NAME', `mail.cyclocoop.org.') + +* hébergeur : gresille.org +define(`GRESILLE_IP4', `IP4(VM)') + +divert(0)dnl +$TTL 1d ; TTL (Time To Live) par défaut pour les enregistrements + +; ENREGISTREMENT « SOA » (Start Of Authority). +@ SOA ns hostmaster ( + ZONE_SERIAL ; Serial number. + 1d ; Refresh. + 15m ; Retry. + 2592000 ; Expire. + 1d ; TTL (Time To Live) minimum. + ) + +; ENREGISTREMENTS « A » (DNS -> adresse IPv4) +@ A IP4(EXOLIA) +git A IP4(GRESILLE) +imap A IP4(GRESILLE) +mail A IP4(EXOLIA) +mx A IP4(GRESILLE) +ns A IP4(GRESILLE) +smtp A IP4(GRESILLE) +submission A IP4(GRESILLE) +sympa A IP4(GRESILLE) +www A IP4(EXOLIA) + +; ENREGISTREMENTS « CNAME » (Canonical NAME) +; NOTE : l'utilisation de CNAME n'est judicieuse que si la ressource pointée +; n'est pas sous notre contrôle. Par exemple, +; foo.example.org. CNAME foo.example.com. +; Dans le cas contraire, le seul résultat est un traffic réseau accru, +; et l'emploi de macros est préférable. +; ```You keep using CNAME records. I do not think they mean what you think they mean.''' + +; ENREGISTREMENTS « MX » (Mail eXchange) +; NOTE : le reverse et le forward associés au nom donné à un enregistrement MX +; devraient correspondre. Certains antispams le vérifient, et certains (rares) admins +; bloquent même au niveau de la session SMTP si il ne correspond pas. +@ MX 10 NAME(EXOLIA_MX) + +; ENREGISTREMENTS « NS » (Name Server) +@ NS ns +#@ NS ns6.gandi.net. + +; ENREGISTREMENTS "PTR" (IPv* -> name) +; NOTE : Dans le cas d’hébergement massif de domaines virtuels derrière une même adresse IP, +; il est recommandé de ne pas appliquer sans discernement la règle un enregistrement PTR +; par enregistrement A (ou AAAA) : le nombre des champs PTR à renvoyer pouvant faire dépasser +; à la réponse la taille des paquets UDP et entraîner l’utilisation du protocole TCP +; (plus coûteux en resources) pour envoyer la réponse à la requête DNS ; +; cf. section "4.4 Usage and deployment considerations" du document : +; http://tools.ietf.org/html/draft-ietf-dnsop-reverse-mapping-considerations + +; ENREGISTREMENTS "SPF" (Sender Policy Framework) +@ 3600 IN SPF "v=spf1 mx ip4:IP4(GRESILLE) -all" +@ 3600 IN TXT "v=spf1 mx ip4:IP4(GRESILLE) -all" + +; ENREGISTREMENTS « SRV » (SeRVice) +_git._tcp.git 18000 IN SRV 0 0 9418 git + +; ENREGISTREMENTS « SSHFP » (Secure SHell FingerPrint) +esyscmd(sudo ssh-keygen -r @) diff --git a/etc/openssl/sympa.heureux-cyclage.org/host.cfg b/etc/openssl/sympa.heureux-cyclage.org/host.cfg index 652ecb4..a3ec475 100644 --- a/etc/openssl/sympa.heureux-cyclage.org/host.cfg +++ b/etc/openssl/sympa.heureux-cyclage.org/host.cfg @@ -27,7 +27,7 @@ [ extensions ] basicConstraints = critical,CA:TRUE,pathlen:0 keyUsage = keyCertSign,cRLSign,digitalSignature,keyEncipherment - subjectAltName = email:contact+$SERVICE@$ENV::x509_host,DNS:$SERVICE.$ENV::x509_host + subjectAltName = email:contact+$SERVICE@$ENV::x509_host,DNS:$SERVICE.$ENV::x509_host,DNS:$SERVICE.cyclocoop.org subjectKeyIdentifier = hash issuerAltName = issuer:copy authorityKeyIdentifier = keyid:always,issuer:always @@ -37,7 +37,7 @@ [ self_signed_extensions ] basicConstraints = critical,CA:TRUE,pathlen:0 keyUsage = keyCertSign,cRLSign,digitalSignature,keyEncipherment - subjectAltName = email:contact+$SERVICE@$ENV::x509_host,DNS:$SERVICE.$ENV::x509_host + subjectAltName = email:contact+$SERVICE@$ENV::x509_host,DNS:$SERVICE.$ENV::x509_host,DNS:$SERVICE.cyclocoop.org subjectKeyIdentifier = hash issuerAltName = issuer:copy authorityKeyIdentifier = keyid:always,issuer:always diff --git a/etc/sv/mysql/configure.sh b/etc/sv/mysql/configure.sh index c4d10b0..29a8c9d 100644 --- a/etc/sv/mysql/configure.sh +++ b/etc/sv/mysql/configure.sh @@ -50,7 +50,7 @@ sudo find "$tool"/etc/mysql/bin/ -type f -perm /+x -exec \ sudo ln -fns \ ../sv/"$sv" \ /etc/service/"$sv" -rule runit_sv_start "$sv" +rule _runit_sv_start "$sv" while ! sudo -u mysql mysql -u mysql