From 22ad507c3072a45bafce133c73158a992074ebba Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Wed, 4 Feb 2015 12:37:23 +0100 Subject: [PATCH] =?utf8?q?Ajout=C2=A0:=20etc/nginx/site.d/lhc-clavette-gre?= =?utf8?q?noble/?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- etc/nginx/site.d/lhc-clav-gre/http.conf | 5 ++++ etc/nginx/site.d/lhc-clav-gre/local.conf | 1 + etc/nginx/site.d/lhc-clav-gre/local.sh | 5 ++++ etc/nginx/site.d/lhc-clav-gre/site.conf | 28 +++++++++++++++++++ etc/php5/fpm/pool.d/lhc_clav_gre/php-fpm.conf | 13 +++++++++ 5 files changed, 52 insertions(+) create mode 100644 etc/nginx/site.d/lhc-clav-gre/http.conf create mode 100644 etc/nginx/site.d/lhc-clav-gre/local.conf create mode 100644 etc/nginx/site.d/lhc-clav-gre/local.sh create mode 100644 etc/nginx/site.d/lhc-clav-gre/site.conf create mode 100644 etc/php5/fpm/pool.d/lhc_clav_gre/php-fpm.conf 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 index 0000000..0a9a5dd --- /dev/null +++ b/etc/nginx/site.d/lhc-clav-gre/http.conf @@ -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 index 0000000..56b9f1c --- /dev/null +++ b/etc/nginx/site.d/lhc-clav-gre/local.conf @@ -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 index 0000000..4ef6323 --- /dev/null +++ b/etc/nginx/site.d/lhc-clav-gre/local.sh @@ -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 index 0000000..931c09f --- /dev/null +++ b/etc/nginx/site.d/lhc-clav-gre/site.conf @@ -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 index 0000000..0064260 --- /dev/null +++ b/etc/php5/fpm/pool.d/lhc_clav_gre/php-fpm.conf @@ -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 -- 2.20.1