I have a old script that only works on php5.6 so I can't use php8. I installed php5.6 by following these instructions https://community.wordops.net/d/147-easy-way-for-a-php5-site but I don't know how to actually make wordops switch php to version 5.6 for specific sites.
command to install php5.6:
apt update && apt install php5.6-fpm php5.6-curl php5.6-gd php5.6-imap php5.6-mcrypt php5.6-readline php5.6-common php5.6-recode php5.6-mysql php5.6-cli php5.6-curl php5.6-mbstring php5.6-bcmath php5.6-mysql php5.6-opcache php5.6-zip php5.6-xml php5.6-soap -y
This is my site config:
server {
server_name testdomain.com www.testdomain.com;
access_log /var/log/nginx/testdomain.com.access.log rt_cache;
error_log /var/log/nginx/testdomain.com.error.log;
root /var/www/testdomain.com/htdocs;
index index.php index.html index.htm;
location ~* \.php$ {
# With php-fpm unix sockets
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}
It doesn't work cause it gives 502 Bad Gateway. Can anyone help me fix the config?