Correcttion : Pas de - dans les nom d'utilisateurs ayant acces a mysql
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 16 Apr 2013 20:55:01 +0000 (22:55 +0200)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 16 Apr 2013 20:55:01 +0000 (22:55 +0200)
etc/nginx/site.d/lhc-stats/configure.sh
etc/nginx/site.d/lhc-stats/site.conf
etc/nginx/site.d/lhc-www/configure.sh
etc/nginx/site.d/lhc-www/site.conf
etc/php5/fpm/pool.d/lhc-stats.conf [deleted file]
etc/php5/fpm/pool.d/lhc-www.conf [deleted file]
etc/php5/fpm/pool.d/lhc_stats.conf [new file with mode: 0644]
etc/php5/fpm/pool.d/lhc_www.conf [new file with mode: 0644]
etc/sv/mysql/configure.sh
etc/sv/php5-fpm/configure.sh

index c1e5035..15ee1b8 100644 (file)
@@ -1,2 +1,2 @@
-sudo adduser php5-lhc-stats www-"$site"
+sudo adduser lhc_stats__php5 www-"$site"
 sudo adduser www-"$site"-tls www-"$site"
index 3e22895..b52ba28 100644 (file)
@@ -45,7 +45,7 @@ location ~ \.php$ {
        fastcgi_pass_header Set-Cookie;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        
-       fastcgi_pass unix:/run/php5/fpm/lhc-stats;
+       fastcgi_pass unix:/run/php5/fpm/lhc_stats;
  }
 
 # vim: ft=sh
index 052d4b9..b9bbd2a 100644 (file)
@@ -1,2 +1,2 @@
-sudo adduser php5-lhc-www www-"$site"
+sudo adduser lhc_www__php5 www-"$site"
 sudo adduser www-"$site"-tls www-"$site"
index 158a7a8..5eabe39 100644 (file)
@@ -45,7 +45,7 @@ location ~ \.php$ {
        fastcgi_pass_header Set-Cookie;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        
-       fastcgi_pass unix:/run/php5/fpm/lhc-www;
+       fastcgi_pass unix:/run/php5/fpm/lhc_www;
  }
 
 # vim: ft=sh
diff --git a/etc/php5/fpm/pool.d/lhc-stats.conf b/etc/php5/fpm/pool.d/lhc-stats.conf
deleted file mode 100644 (file)
index 9f4f8c1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-pm.max_children = 15
-pm.max_requests = 200
-pm.max_spare_servers = 15
-pm.min_spare_servers = 2
-pm.process_idle_timeout = 60s
-pm.start_servers = 3
-request_slowlog_timeout = 5s
-request_terminate_timeout = 120s
-rlimit_core = unlimited
-rlimit_files = 131072
-security.limit_extensions = .php
diff --git a/etc/php5/fpm/pool.d/lhc-www.conf b/etc/php5/fpm/pool.d/lhc-www.conf
deleted file mode 100644 (file)
index 9f4f8c1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-pm.max_children = 15
-pm.max_requests = 200
-pm.max_spare_servers = 15
-pm.min_spare_servers = 2
-pm.process_idle_timeout = 60s
-pm.start_servers = 3
-request_slowlog_timeout = 5s
-request_terminate_timeout = 120s
-rlimit_core = unlimited
-rlimit_files = 131072
-security.limit_extensions = .php
diff --git a/etc/php5/fpm/pool.d/lhc_stats.conf b/etc/php5/fpm/pool.d/lhc_stats.conf
new file mode 100644 (file)
index 0000000..9f4f8c1
--- /dev/null
@@ -0,0 +1,11 @@
+pm.max_children = 15
+pm.max_requests = 200
+pm.max_spare_servers = 15
+pm.min_spare_servers = 2
+pm.process_idle_timeout = 60s
+pm.start_servers = 3
+request_slowlog_timeout = 5s
+request_terminate_timeout = 120s
+rlimit_core = unlimited
+rlimit_files = 131072
+security.limit_extensions = .php
diff --git a/etc/php5/fpm/pool.d/lhc_www.conf b/etc/php5/fpm/pool.d/lhc_www.conf
new file mode 100644 (file)
index 0000000..9f4f8c1
--- /dev/null
@@ -0,0 +1,11 @@
+pm.max_children = 15
+pm.max_requests = 200
+pm.max_spare_servers = 15
+pm.min_spare_servers = 2
+pm.process_idle_timeout = 60s
+pm.start_servers = 3
+request_slowlog_timeout = 5s
+request_terminate_timeout = 120s
+rlimit_core = unlimited
+rlimit_files = 131072
+security.limit_extensions = .php
index c576325..2c00148 100644 (file)
@@ -100,6 +100,5 @@ sudo mysql -u root --batch --verbose <<-EOF
                                 END IF;
                         END;
         //
-       DROP PROCEDURE IF EXISTS mysql.show_user;
        FLUSH PRIVILEGES;
        EOF
index d349e1f..44d5489 100644 (file)
@@ -40,7 +40,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \
  -false ${@:+$(printf -- '-or -name %s.conf\n' "$@")} \
  -printf '%f\n')
  do pool=${pool%\.conf}
-       rule adduser php5-"$pool" \
+       rule adduser "$pool"__php5 \
         --disabled-login \
         --disabled-password \
         --group \
@@ -71,7 +71,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \
                env[TEMP] = /tmp
                env[TMPDIR] = /tmp
                env[TMP] = /tmp
-               group = php5-$pool
+               group = ${pool}__php5
                #listen = 127.0.0.1:9000
                listen = /run/php5/fpm/$pool
                #listen.allowed_clients = 127.0.0.1
@@ -91,7 +91,7 @@ for pool in $(find "$tool"/etc/php5/fpm/pool.d/ \
                rlimit_core = unlimited
                rlimit_files = 131072
                slowlog = /home/www/log/php5/fpm/$pool/slow.log
-               user = php5-$pool
+               user = ${pool}__php5
                $(cat "$tool"/etc/php5/fpm/pool.d/"$conf")
                EOF
        sudo install -m 664 -o php5 -g php5 \