summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@plonk.spline.inf.fu-berlin.de>2019-11-06 16:05:10 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2019-11-06 16:08:03 +0100
commit140ca7ac6d1264751e2bad5f36a86c2b37e5e55d (patch)
treeeb1355407ba556a6b8cc54c7c5042f2708569089
parentb7fc85cb6e35976a5cdd8a24f4131e3813a83955 (diff)
downloadusermanagement-140ca7ac6d1264751e2bad5f36a86c2b37e5e55d.tar.gz
usermanagement-140ca7ac6d1264751e2bad5f36a86c2b37e5e55d.tar.bz2
usermanagement-140ca7ac6d1264751e2bad5f36a86c2b37e5e55d.zip
userSubGenerate: vm-userpage update
New version of php and a different config for apache and php.
-rwxr-xr-xuserSubGenerate40
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