diff options
-rwxr-xr-x | userSubGenerate | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/userSubGenerate b/userSubGenerate index 8d5ec59..56798c4 100755 --- a/userSubGenerate +++ b/userSubGenerate @@ -57,7 +57,6 @@ cat <<EOF > $TMPFILEAPACHEGLOBAL # Für jeden User gibt es hier spezifische Einstellungen, # die wir im vhost und im /~user/ brauchen. -AddHandler php-fastcgi .php .php3 .php4 .php5 DirectoryIndex index.html index.htm index.php EOF @@ -94,28 +93,21 @@ EOF cat <<EOF >> $TMPFILEAPACHEGLOBAL # php fuer $SPLINEUID ($FULLNAME) -FastCGIExternalServer /home/$SPLINEUID/php-worker -socket /var/run/php5-fpm/$SPLINEUID.sock -ScriptAlias /home/$SPLINEUID/php-worker.fcgi /home/$SPLINEUID/php-worker - -<Directory /home/$SPLINEUID/> - Action php-fastcgi /home/$SPLINEUID/php-worker.fcgi -</Directory> - -<Directory /home/$SPLINEUID/php-worker> - Options ExecCGI - Order allow,deny - Allow from all -</Directory> +<Proxy "unix:/run/php/php7.0-fpm-$SPLINEUID.sock|fcgi://php-fpm-$SPLINEUID"> + ProxySet disablereuse=off +</Proxy> <Directory /home/$SPLINEUID/public_html/webroot> + AddHandler proxy:fcgi://php-fpm-$SPLINEUID .php .php3 .php4 .php5 + AllowOverride All Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec + Require all granted </Directory> <Directory /home/$SPLINEUID/public_html/cgi-bin> - Options ExecCGI - Order allow,deny - Allow from all + Options +ExecCGI + Require all granted </Directory> @@ -139,8 +131,7 @@ EOF SuexecUserGroup $SPLINEUID users <Location "/php-status"> - SetHandler php-fastcgi-status - Action php-fastcgi-status /home/$SPLINEUID/php-worker.fcgi virtual + SetHandler proxy:fcgi://php-fpm-$SPLINEUID </Location> </VirtualHost> @@ -150,20 +141,25 @@ EOF [$SPLINEUID] user = \$pool group = nogroup -listen = /var/run/php5-fpm/\$pool.sock +listen = /run/php/php7.0-fpm-\$pool.sock listen.owner = www-data listen.group = nogroup listen.mode = 0600 pm = ondemand -pm.max_children = 10 +pm.max_children = 25 +pm.start_servers = 10 +pm.min_spare_servers = 5 +pm.max_spare_servers = 20 +pm.max_requests = 50 pm.process_idle_timeout = 10s pm.status_path = /php-status catch_workers_output = yes security.limit_extensions = .php .php3 .php4 .php5 +request_terminate_timeout = 300s EOF @@ -171,10 +167,10 @@ EOF done echo "Kopiere $TMPFILEPHP nach userpage:/etc/php5/fpm/pool.d/users.conf ..." >&3 -scp $TMPFILEPHP www-data@userpage.spline.inf.fu-berlin.de:/etc/php5/fpm/pool.d/users.conf +scp $TMPFILEPHP www-data@userpage.spline.inf.fu-berlin.de:/etc/php/7.0/fpm/pool.d/users.conf echo "Starte den php-fpm auf userpage neu." >&3 -ssh www-data@userpage.spline.inf.fu-berlin.de sudo /etc/init.d/php5-fpm reload +ssh www-data@userpage.spline.inf.fu-berlin.de sudo /etc/init.d/php7.0-fpm reload echo "Kopiere $TMPFILEAPACHEVHOSTS nach userpage:/etc/apache2/user-site.d/user-vhosts.conf ..." >&3 scp $TMPFILEAPACHEVHOSTS www-data@userpage.spline.inf.fu-berlin.de:/etc/apache2/user-site.d/user-vhosts.conf |