AjoutĀ : etc/nginx/site.d/lhc-clavette-grenoble/
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Wed, 4 Feb 2015 11:37:23 +0000 (12:37 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 6 Feb 2015 10:04:41 +0000 (11:04 +0100)
etc/nginx/site.d/lhc-clav-gre/http.conf [new file with mode: 0644]
etc/nginx/site.d/lhc-clav-gre/local.conf [new file with mode: 0644]
etc/nginx/site.d/lhc-clav-gre/local.sh [new file with mode: 0644]
etc/nginx/site.d/lhc-clav-gre/site.conf [new file with mode: 0644]
etc/php5/fpm/pool.d/lhc_clav_gre/php-fpm.conf [new file with mode: 0644]

diff --git a/etc/nginx/site.d/lhc-clav-gre/http.conf b/etc/nginx/site.d/lhc-clav-gre/http.conf
new file mode 100644 (file)
index 0000000..0a9a5dd
--- /dev/null
@@ -0,0 +1,5 @@
+server {
+       listen 80;
+       server_name
+        clavette-grenoble.heureux-cyclage.org;
+ }
diff --git a/etc/nginx/site.d/lhc-clav-gre/local.conf b/etc/nginx/site.d/lhc-clav-gre/local.conf
new file mode 100644 (file)
index 0000000..56b9f1c
--- /dev/null
@@ -0,0 +1 @@
+listen 80;
diff --git a/etc/nginx/site.d/lhc-clav-gre/local.sh b/etc/nginx/site.d/lhc-clav-gre/local.sh
new file mode 100644 (file)
index 0000000..4ef6323
--- /dev/null
@@ -0,0 +1,5 @@
+pool=lhc_clav_gre
+sudo adduser php_"$pool" www-"$site"
+#sudo adduser www-"$site"-tls www-"$site"
+"$tool"/local/mysql-user-create     php_"$pool"
+"$tool"/local/mysql-database-create php_"$pool"
diff --git a/etc/nginx/site.d/lhc-clav-gre/site.conf b/etc/nginx/site.d/lhc-clav-gre/site.conf
new file mode 100644 (file)
index 0000000..931c09f
--- /dev/null
@@ -0,0 +1,28 @@
+server_name
+    clavette-grenoble.heureux-cyclage.org;
+root /home/www/data/lhc-clav-gre/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:/run/php5/fpm/lhc_clav_gre;
+}
+error_page 404 = @spip;
+
+location @spip {
+       rewrite ^/(.*)(\.html)?$  /spip.php?url_propre=$1&$args last;
+}
+# vim: ft=sh
diff --git a/etc/php5/fpm/pool.d/lhc_clav_gre/php-fpm.conf b/etc/php5/fpm/pool.d/lhc_clav_gre/php-fpm.conf
new file mode 100644 (file)
index 0000000..0064260
--- /dev/null
@@ -0,0 +1,13 @@
+#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