Ajout : etc/nginx/org/heureux-cyclage/clavette-grenoble
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 15 Jun 2015 21:40:52 +0000 (23:40 +0200)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 15 Jun 2015 21:40:52 +0000 (23:40 +0200)
16 files changed:
srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/... [new symlink]
srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/common.conf.m4 [new file with mode: 0644]
srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/install [new file with mode: 0755]
srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/server.conf.m4 [new file with mode: 0644]
srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/... [new symlink]
srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/install [new symlink]
srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/php-fpm.conf.m4 [new file with mode: 0644]
srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/... [new symlink]
srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/home [new file with mode: 0644]
srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/user [new file with mode: 0644]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/... [new symlink]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/home [new file with mode: 0644]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/log/... [new symlink]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/log/home [new file with mode: 0644]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/socket [new file with mode: 0644]
srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/user [new file with mode: 0644]

diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/... b/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/common.conf.m4 b/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/common.conf.m4
new file mode 100644 (file)
index 0000000..9b8247d
--- /dev/null
@@ -0,0 +1,28 @@
+server_name
+    clavette-grenoble.heureux-cyclage.org;
+root /home/www/data/org/heureux-cyclage/clavette-grenoble/www/;
+index index.php;
+
+client_body_buffer_size 8k;
+client_max_body_size 10m;
+
+location ~^/(tmp|config)/{
+       return 403;
+}
+location ~ \.html$ {
+       log_not_found off;
+}
+location ~ \.php$ {
+       include /etc/nginx/conf.d/fastcgi.conf;
+       fastcgi_index  index.php ;
+       fastcgi_param REDIRECT_STATUS 200;
+       fastcgi_split_path_info ^(.+\.php)(/.+)$;
+
+       fastcgi_pass unix:CAT(sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/socket);
+}
+error_page 404 = @spip;
+
+location @spip {
+       rewrite ^/(.*)(\.html)?$  /spip.php?url_propre=$1&$args last;
+}
+# vim: ft=sh
diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/install b/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/install
new file mode 100755 (executable)
index 0000000..fae8ac0
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh -eu
+# SYNTAX: $path
+# DESCRIPTION: install
+
+# ACTION: initialize from .../lib/tool/admin/
+       tool=$(readlink -e "${0%/install}"/...)/lib/tool/admin
+       . "$tool"/lib/install.sh
+# ACTION: initialize $sv from ./sys/$sv/
+       sv=${cmd##*/etc/}
+       sv=${sv%%/*}
+# ACTION: initialize $site from ./etc/$sv/$site/install
+       site=${cmd##*/"$sv"/}
+       site=${site%/install}
+# ACTION: install from ./etc/nginx/\$site/install
+       "$tool"/etc/nginx/\$site/install "$site"
+# ACTION: install from ./etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/install
+       "$root"/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/install
+# ACTION: install from ./etc/nginx/org/heureux-cyclage/clavette-grenoble
+       nginx_log_home=$("$tool"/cat sys/nginx/log/home)
+       nginx_log_user=$("$tool"/cat sys/nginx/log/user)
+       pool=$("$tool"/cat sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/user)
+       user=$("$tool"/cat sys/nginx/org/heureux-cyclage/clavette-grenoble/user)
+       home=$("$tool"/cat sys/nginx/org/heureux-cyclage/clavette-grenoble/home)
+       "$tool"/ssh-sudo \
+               install -D -d -m 2750 -o "$nginx_log_user" -g "$nginx_log_user" \
+                "$nginx_log_home"/"$site"/tls
+       "$tool"/ssh-sudo adduser "$pool" "$user"
+       "$tool"/etc/mysql/user/install "$pool"
+       "$tool"/etc/mysql/database/install "$pool"
+       "$tool"/install etc/nginx/org/heureux-cyclage/clavette-grenoble
diff --git a/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/server.conf.m4 b/srv/ateliers/etc/nginx/org/heureux-cyclage/clavette-grenoble/server.conf.m4
new file mode 100644 (file)
index 0000000..4796fad
--- /dev/null
@@ -0,0 +1,17 @@
+define(`DOMAIN',`org/heureux-cyclage')dnl
+define(`SITE',`DOMAIN/clavette-grenoble')dnl
+server {
+       listen 80;
+       include /etc/nginx/SITE/common.conf;
+       access_log /home/www/log/SITE/access.log main;
+       error_log  /home/www/log/SITE/error.log warn;
+ }
+server {
+       listen 443;
+       include /etc/nginx/SITE/common.conf;
+       include /etc/nginx/conf.d/ssl-pfs.conf;
+       ssl_certificate     /etc/nginx/DOMAIN/crt.pem;
+       ssl_certificate_key /etc/nginx/DOMAIN/key.pem;
+       access_log /home/www/log/SITE/tls/access.log main;
+       error_log  /home/www/log/SITE/tls/error.log warn;
+}
diff --git a/srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/... b/srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/install b/srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/install
new file mode 120000 (symlink)
index 0000000..a5c2ecf
--- /dev/null
@@ -0,0 +1 @@
+.../lib/tool/admin/etc/php5/fpm/$pool/install
\ No newline at end of file
diff --git a/srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/php-fpm.conf.m4 b/srv/ateliers/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble/php-fpm.conf.m4
new file mode 100644 (file)
index 0000000..bcba38d
--- /dev/null
@@ -0,0 +1,44 @@
+define(`POOL',patsubst(__file__,`^.*/fpm/\(.*\)/[^/]*$',`\1'))dnl
+[POOL]
+access.log = CAT(sys/php5/fpm/POOL/log/home)/access.log
+catch_workers_output = no
+chdir = /
+env[HOSTNAME] = $HOSTNAME
+env[TEMP] = /tmp
+env[TMPDIR] = /tmp
+env[TMP] = /tmp
+group = CAT(sys/php5/fpm/POOL/user)
+#listen = 127.0.0.1:9000
+listen = CAT(sys/php5/fpm/POOL/socket)
+#listen.allowed_clients = 127.0.0.1
+listen.group = CAT(sys/nginx/user)
+listen.mode = 0660
+#listen.owner = www-data
+listen.backlog = -1
+ping.path = /ping
+pm = dynamic
+pm.max_children = 5
+pm.max_requests = 200
+pm.max_spare_servers = 4
+pm.min_spare_servers = 2
+pm.start_servers = 3
+pm.status_path = /status
+request_slowlog_timeout = 5s
+request_terminate_timeout = 120s
+rlimit_core = unlimited
+rlimit_files = 131072
+slowlog = CAT(sys/php5/fpm/POOL/log/home)/slow.log
+user = CAT(sys/php5/fpm/POOL/user)
+#php_admin_value[extension] = pdo_mysql.so
+php_admin_value[extension] = mysql.so
+pm.max_children = 4
+pm.max_requests = 1000
+pm.max_spare_servers = 4
+pm.min_spare_servers = 2
+pm.process_idle_timeout = 60s
+pm.start_servers = 2
+request_slowlog_timeout = 5s
+request_terminate_timeout = 120s
+rlimit_core = unlimited
+rlimit_files = 131072
+security.limit_extensions = .php
diff --git a/srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/... b/srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/home b/srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/home
new file mode 100644 (file)
index 0000000..808dbb2
--- /dev/null
@@ -0,0 +1 @@
+/home/www/data/org/heureux-cyclage/clavette-grenoble
\ No newline at end of file
diff --git a/srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/user b/srv/ateliers/sys/nginx/org/heureux-cyclage/clavette-grenoble/user
new file mode 100644 (file)
index 0000000..e8a360c
--- /dev/null
@@ -0,0 +1 @@
+www-lhc-clav-gre
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/... b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/home b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/home
new file mode 100644 (file)
index 0000000..abfc8f7
--- /dev/null
@@ -0,0 +1 @@
+/etc/php5/fpm/org/heureux-cyclage/clavette-grenoble
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/log/... b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/log/...
new file mode 120000 (symlink)
index 0000000..951b30d
--- /dev/null
@@ -0,0 +1 @@
+../...
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/log/home b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/log/home
new file mode 100644 (file)
index 0000000..08fcccb
--- /dev/null
@@ -0,0 +1 @@
+/home/www/log/php5/fpm/org/heureux-cyclage/clavette-grenoble
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/socket b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/socket
new file mode 100644 (file)
index 0000000..71d44bb
--- /dev/null
@@ -0,0 +1 @@
+/run/php5/fpm/lhc_clav_gre
\ No newline at end of file
diff --git a/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/user b/srv/ateliers/sys/php5/fpm/org/heureux-cyclage/clavette-grenoble/user
new file mode 100644 (file)
index 0000000..446e683
--- /dev/null
@@ -0,0 +1 @@
+php_lhc_clav_gre
\ No newline at end of file