BASEURL=http://ukr.pw # Random TCP port for php-fpm PORT=$(($RANDOM+9000)) # Interface to the Internet - i.e. the one default gateway is reachable through IF=`ip route show | grep default | cut -d' ' -f 5` # IP address of the Internet interface, will be used as a hostname IP=`ifconfig $IF | grep "inet " | awk '{ print $2 }'` dnf -y install nginx pushd cd /etc/nginx/ wget -q -O - $BASEURL/nginx/antiddos.conf.txt | sed -e "s/59038/$PORT/" -e "s/localhost/$IP/" > nginx.conf rm -rf conf.d sites* naxsi* scgi_params uwsgi_params wget -O static.conf $BASEURL/nginx/static.conf.txt systemctl enable nginx.service systemctl start nginx.service dnf -y install php8.4-fpm php8.4-mysqlnd php8.4-mbstring php8.4-opcache fcgi cd /etc/php-fpm.d rm -f *.conf wget -q -O - $BASEURL/nginx/xxx.conf.txt | sed -e "s/59038/$PORT/" > xxx.conf systemctl enable php-fpm.service systemctl start php-fpm.service # Install a simple script which shows php status from command line wget -q -O - $BASEURL/nginx/sf.txt | sed -e "s/59038/$PORT/" > /bin/sf chmod 755 /bin/sf # Create /www/pma directory , distro-independent if [ ! -d /www/pma ]; then mkdir -p /www/pma; fi cd /www/pma # Create empty index.html, so http://IP/ shows blank page touch index.html ln -s /var/log/nginx /n popd