Compare commits
2 Commits
e00528d9c8
...
11de7a88ae
Author | SHA1 | Date | |
---|---|---|---|
|
11de7a88ae | ||
|
0c5ee948b5 |
|
@ -4,7 +4,7 @@ Alias /panel /srv/www/html/panel
|
||||||
|
|
||||||
# panel php-fpm worker
|
# panel php-fpm worker
|
||||||
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
|
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
|
||||||
SetHandler "proxy:unix:/run/php/php8.1-fpm-vpanel.sock|fcgi://localhost"
|
SetHandler "proxy:unix:/run/php/php-fpm-vpanel.sock|fcgi://localhost"
|
||||||
</FilesMatch>
|
</FilesMatch>
|
||||||
|
|
||||||
# Enable rewrite engine
|
# Enable rewrite engine
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[vpanel]
|
[vpanel]
|
||||||
user = vpanel
|
user = vpanel
|
||||||
group = vpanel
|
group = vpanel
|
||||||
listen = /run/php/php8.1-fpm-vpanel.sock
|
listen = /run/php/php-fpm-vpanel.sock
|
||||||
listen.owner = www-data
|
listen.owner = www-data
|
||||||
listen.group = www-data
|
listen.group = www-data
|
||||||
pm = ondemand
|
pm = ondemand
|
12
install.sh
12
install.sh
|
@ -1,12 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
apt-get install -y sudo
|
||||||
useradd --no-create-home --home-dir /srv/www/html/panel --shell /usr/sbin/nologin --system --user-group vpanel
|
useradd --no-create-home --home-dir /srv/www/html/panel --shell /usr/sbin/nologin --system --user-group vpanel
|
||||||
cp bin/vpanel-verify-access.sh /usr/local/bin/
|
cp bin/vpanel-verify-access.sh /usr/local/bin/
|
||||||
chmod 755 /usr/local/bin/vpanel-verify-access.sh
|
chmod 755 /usr/local/bin/vpanel-verify-access.sh
|
||||||
|
# set PHP version
|
||||||
|
PHP_MAJOR_VERSION=`php -r "echo PHP_MAJOR_VERSION;"`
|
||||||
|
PHP_MINOR_VERSION=`php -r "echo PHP_MINOR_VERSION;"`
|
||||||
|
phpVersion=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION
|
||||||
|
# create versioned php fpm dir
|
||||||
|
mkdir etc/php/$phpVersion
|
||||||
|
mv etc/php/fpm etc/php/$phpVersion/
|
||||||
cp -a etc/* /etc/
|
cp -a etc/* /etc/
|
||||||
chmod 440 /etc/sudoers.d/vpanel
|
chmod 440 /etc/sudoers.d/vpanel
|
||||||
a2enconf vpanel
|
a2enconf vpanel
|
||||||
sed -i "s|;process_control_timeout = 0|process_control_timeout = 1s|g" /etc/php/8.1/fpm/php-fpm.conf
|
sed -i "s|;process_control_timeout = 0|process_control_timeout = 1s|g" /etc/php/$phpVersion/fpm/php-fpm.conf
|
||||||
service php8.1-fpm restart
|
service php$phpVersion-fpm restart
|
||||||
service apache2 restart
|
service apache2 restart
|
||||||
cp -a panel /srv/www/html/
|
cp -a panel /srv/www/html/
|
||||||
mkdir /srv/www/html/panel/tmp
|
mkdir /srv/www/html/panel/tmp
|
||||||
|
|
Loading…
Reference in New Issue
Block a user