Compare commits

..

No commits in common. "11de7a88aeccf85baae6c5e97f73a813d14870d9" and "e00528d9c8f6adc66f3e3368ef0929dd6c8e4cb4" have entirely different histories.

3 changed files with 4 additions and 12 deletions

View File

@ -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/php-fpm-vpanel.sock|fcgi://localhost" SetHandler "proxy:unix:/run/php/php8.1-fpm-vpanel.sock|fcgi://localhost"
</FilesMatch> </FilesMatch>
# Enable rewrite engine # Enable rewrite engine

View File

@ -1,7 +1,7 @@
[vpanel] [vpanel]
user = vpanel user = vpanel
group = vpanel group = vpanel
listen = /run/php/php-fpm-vpanel.sock listen = /run/php/php8.1-fpm-vpanel.sock
listen.owner = www-data listen.owner = www-data
listen.group = www-data listen.group = www-data
pm = ondemand pm = ondemand

View File

@ -1,20 +1,12 @@
#!/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/$phpVersion/fpm/php-fpm.conf sed -i "s|;process_control_timeout = 0|process_control_timeout = 1s|g" /etc/php/8.1/fpm/php-fpm.conf
service php$phpVersion-fpm restart service php8.1-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