reverted php to 8.1, fixed nginx-badbots
This commit is contained in:
parent
2c3682bf4c
commit
8ecaf8d78a
@ -1,5 +1,5 @@
|
|||||||
[Definition]
|
[Definition]
|
||||||
|
|
||||||
failregex = FastCGI sent in stderr: "Primary script unknown" .*, client: <HOST>
|
failregex = FastCGI sent in stderr: "Primary script unknown" .*, client: <HOST>, server: .*
|
||||||
|
|
||||||
ignoreregex =
|
ignoreregex =
|
1920
assets/php8.1-fpm.ini
Normal file
1920
assets/php8.1-fpm.ini
Normal file
File diff suppressed because it is too large
Load Diff
28
bin/lemp.sh
28
bin/lemp.sh
@ -36,9 +36,19 @@ echo -e '\033[35m
|
|||||||
/ ____/ __ / ____/
|
/ ____/ __ / ____/
|
||||||
/_/ /_/ /_/_/
|
/_/ /_/ /_/_/
|
||||||
\033[0m'
|
\033[0m'
|
||||||
echo -e "\033[35;1mInstalling PHP 8.2 \033[0m"
|
|
||||||
|
echo -e "\033[35;1mInstalling SURY \033[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
|
apt-get --yes install ca-certificates apt-transport-https software-properties-common curl lsb-release
|
||||||
|
curl -sSL https://packages.sury.org/php/README.txt | bash -x
|
||||||
|
apt-get update && apt-get upgrade
|
||||||
|
|
||||||
|
echo -e "\033[35;1mInstalling PHP \033[0m"
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# mv: cannot stat '/etc/php/7.0/fpm/php.ini': No such file or directory
|
# mv: cannot stat '/etc/php/7.0/fpm/php.ini': No such file or directory
|
||||||
# cp: cannot create regular file '/etc/php/7.0/fpm/php.ini': No such file or directory
|
# cp: cannot create regular file '/etc/php/7.0/fpm/php.ini': No such file or directory
|
||||||
# Configuring PHP
|
# Configuring PHP
|
||||||
@ -48,12 +58,12 @@ sleep 3
|
|||||||
# apt-get --yes install php7.4-fpm php7.4-mysql php7.4-opcache php7.4-curl php7.4-mbstring php7.4-zip php7.4-xml php7.4-gd php-memcached php7.4-imagick php7.4-apcu
|
# apt-get --yes install php7.4-fpm php7.4-mysql php7.4-opcache php7.4-curl php7.4-mbstring php7.4-zip php7.4-xml php7.4-gd php-memcached php7.4-imagick php7.4-apcu
|
||||||
# php7.4-mcrypt ??
|
# php7.4-mcrypt ??
|
||||||
|
|
||||||
# apt-get --yes install php8.1-fpm php8.1-mysql php8.1-opcache php8.1-curl php8.1-mbstring php8.1-zip php8.1-xml php8.1-gd php-memcached php8.1-imagick php8.1-apcu php8.1-redis php8.1-bz2 php8.1-bcmath
|
apt-get --yes install php8.1-fpm php8.1-mysql php8.1-opcache php8.1-curl php8.1-mbstring php8.1-zip php8.1-xml php8.1-gd php-memcached php8.1-imagick php8.1-apcu php8.1-redis php8.1-bz2 php8.1-bcmath
|
||||||
|
|
||||||
apt-get --yes install php8.2-fpm php8.2-mysql php8.2-opcache php8.2-curl php8.2-mbstring php8.2-zip php8.2-xml php8.2-gd php-memcached php8.2-imagick php8.2-apcu php8.2-redis php8.2-bz2 php8.2-bcmath
|
# apt-get --yes install php8.2-fpm php8.2-mysql php8.2-opcache php8.2-curl php8.2-mbstring php8.2-zip php8.2-xml php8.2-gd php-memcached php8.2-imagick php8.2-apcu php8.2-redis php8.2-bz2 php8.2-bcmath
|
||||||
|
|
||||||
mv /etc/php/8.2/fpm/php.ini /etc/php/8.2/fpm/php.ini.back
|
mv /etc/php/8.1/fpm/php.ini /etc/php/8.1/fpm/php.ini.back
|
||||||
cp "$_assets"/php8.2-fpm.ini /etc/php/8.2/fpm/php.ini
|
cp "$_assets"/php8.1-fpm.ini /etc/php/8.1/fpm/php.ini
|
||||||
|
|
||||||
echo "Configuring PHP"
|
echo "Configuring PHP"
|
||||||
|
|
||||||
@ -61,8 +71,8 @@ mkdir /var/log/php
|
|||||||
chown www-data /var/log/php
|
chown www-data /var/log/php
|
||||||
cp "$_assets"/logrotate-php /etc/logrotate.d/php
|
cp "$_assets"/logrotate-php /etc/logrotate.d/php
|
||||||
|
|
||||||
systemctl enable php8.2-fpm
|
systemctl enable php8.1-fpm
|
||||||
systemctl start php8.2-fpm
|
systemctl start php8.1-fpm
|
||||||
|
|
||||||
# echo "Installing memecached"
|
# echo "Installing memecached"
|
||||||
# replaced by redis
|
# replaced by redis
|
||||||
@ -172,7 +182,7 @@ echo -e '\033[35m
|
|||||||
\033[0m'
|
\033[0m'
|
||||||
echo -e "\033[35;1mInstalling Redis \033[0m"
|
echo -e "\033[35;1mInstalling Redis \033[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
apt-get --yes install redis-server php-redis
|
apt-get --yes install redis-server php8.1-redis
|
||||||
|
|
||||||
# TODO set maxmemory=2gb
|
# TODO set maxmemory=2gb
|
||||||
# TODO set maxmemory-policy=volatile-lru
|
# TODO set maxmemory-policy=volatile-lru
|
||||||
@ -186,7 +196,7 @@ apt-get --yes install redis-server php-redis
|
|||||||
|
|
||||||
systemctl enable redis-server
|
systemctl enable redis-server
|
||||||
systemctl restart redis-server
|
systemctl restart redis-server
|
||||||
systemctl restart php8.2-fpm
|
systemctl restart php8.1-fpm
|
||||||
echo -e "\033[92;1mRedis installed\033[Om"
|
echo -e "\033[92;1mRedis installed\033[Om"
|
||||||
|
|
||||||
echo -e '\033[35m
|
echo -e '\033[35m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user