I get an error when I want to change the php version

I am changing the php version of a domain via the interface but nginx and apache are failing. Let me give information about the process I did before.
1.I added a new private ip address to eth1. Then I saw that this private ip address was automatically added by hestia as a public ip address with NAT and since the newly added domains were added with this ip address, I disable this ip address via ubuntu netplan and rebooted.
2. I replaced it with the following script.
#!/bin/bash
while IFS= read -r DOMAIN; do
v-change-web-domain-ip tumblr “$DOMAIN” 1.2.3.4
done < print.txt

  1. then when I try to change the php version through the interface, I get nginx and apache failed error. what could be the problem in your case. i tried many things but i could not solve the problem. can you help?

When I update the following files, the nginx and apache2 failed error is fixed, but when I want to change the php version again, these files do not print the ip address, what could be the problem. 1.2.3.4
nano /etc/apache2/conf.d/domains/test-domain-com.conf
nano /etc/apache2/conf.d/domains/test-domain-com.ssl.conf
nano /etc/nginx/conf.d/domains/test-domain-com.conf
nano /etc/nginx/conf.d/domains/test-domain-com.ssl.conf

HOSTNAME OS VER ARCH HESTIA RELEASE UPTIME LA


test-domain-com Ubuntu 22.04 x86_64 1.8.12 release 12 0.16

v-update-sys-ip
mv: ‘/usr/local/hestia/data/ips/1.2.3.4’ and ‘/usr/local/hestia/data/ips/1.2.3.4’ are the same file
/usr/local/hestia/func/ip.sh: line 186: 5 - ( / 8): syntax error: operand expected (error token is “/ 8)”)
mv: target ‘.conf’ is not a directory
sed: can’t read 1.2.3.4: No such file or directory
sed: can’t read .conf: No such file or directory
mv: target ‘.conf’ is not a directory
sed: can’t read 1.2.3.4: No such file or directory
sed: can’t read .conf: No such file or directory

Also, doesn’t the php version change via command line? can anyone do this?

v-update-sys-ip

V-update-sys-ip is designed to automatically update system IP addresses in the HestiaCP environment. Its main function is to scan the IP addresses configured in the system and register these IP addresses in Hestia’s internal database. This is particularly useful for VPS servers, as the IP address of VPS is usually set by the manager. The following is an explanation of the main parts of the script:

###Introduction of Variables and Functions

-The script first introduces some necessary configuration files and function libraries, which contain HestiaCP configuration information and some commonly used functions.

###Verification

-Before performing any operation, the script checks whether Hestia is in demo mode (read-only mode) to avoid making changes in inappropriate environments.

###Action

      • List the system IP addresses * *:
        -Use the ip command and jq tool to list all non loopback network interfaces (NICs) and obtain their IPv4 addresses.
      • Check for changes in primary IP * *:
        -If there is only one IP address in the system and this IP address is different from the IP address recorded in the Hestia database, the script will assume that the primary IP address has been changed.
      • Update Configuration * *:
        -If a change in the primary IP address is detected, the script will update the IP address records in the Hestia database and modify the relevant configuration files accordingly (such as proxy, web server, mail server, DNS server, FTP server, and firewall configuration).
        -For each service (such as Web, Mail, DNS, etc.), the script will traverse all system users, update their configuration files, and rebuild the configuration of the relevant domains.
      • Add system IP * *:
        -For newly detected IP addresses in the system, if they have not been recorded in the Hestia database, the script will add these IP addresses.
      • Update NAT * *:
        -The script will attempt to obtain the public IPv4 address of the server and compare it with the records in the Hestia database. If the public IP address is not recorded in the database, the script will set it as the destination IP for NAT.
      • Update IP usage counter * *:
        -Finally, the script will update the usage counter of IP addresses in the Hestia system.

###Script ends

-The script ends with the ‘exit’ command, ensuring that the script exits normally after execution.

###Precautions

-The script uses’ jq ‘to process the output of the’ ip ‘command, which requires the installation of the’ jq 'tool in the system.
-The script assumes that some environment variables (such as $HESITA, $BIN, etc.) have already been defined in the introduced configuration file.
-The script contains configuration updates for multiple services, which requires HestiaCP and related services (such as Apache, Nginx, Postfix, etc.) to be installed and configured correctly.
-Before executing the script, it is recommended to run it in a testing environment to ensure that it does not cause unexpected changes to your production environment.