Migrate from Hestiacp apache + nginx to only nginx error

Hi there, I got this link for the migration https://github.com/hestiacp/hestiacp/blob/main/install/upgrade/manual/migrate_ngnix_apache_nginx-php-fpm.sh

But somehow I received error messages:
migrate_ngnix_apache_nginx-php-fpm.sh: line 1: /v-list-users: No such file or directory

migrate_ngnix_apache_nginx-php-fpm.sh: line 1: /v-list-web-domains: No such file or directory

migrate_ngnix_apache_nginx-php-fpm.sh: line 1: payload:allShortcutsEnabled:false: command not found

Please advice!

Hi @omchilin,

Seems you download that script using something like:

wget https://github.com/hestiacp/hestiacp/blob/main/install/upgrade/manual/migrate_ngnix_apache_nginx-php-fpm.sh

And doing that you are downloading the html page, not the script. If you want to download the script you should use the raw version:

wget https://raw.githubusercontent.com/hestiacp/hestiacp/main/install/upgrade/manual/migrate_ngnix_apache_nginx-php-fpm.sh

Anyway, you don’t need to download anything because that script is already in your server, it’s part of Hestia.



1 Like

Hello sahsanu,

Thanks for the help, it works perfectly! took about a few seconds… :slight_smile:

Thanks again!

1 Like

Hi Another question is how to remove Apache2 after down the migration?

rm /usr/local/hestia/conf/defaults/hestia.conf first …

Since Hestia 1.8.0 you fixed that and the script is removing defaults/hestia.conf:

Migrated a server 2 weeks before 1.8.9 / 1.8.10 update and it broke my server the updating of the config files …

apt remove --purge apache2 apache2-bin apache2-data apache2-suexec-custom apache2-suexec-pristine apache2-utils libapache2-mod-fcgid

Regarding what @eris is saying, let’s check that your conf is good, show the output of these commands:

grep -E '^WEB_|^PROXY_' /usr/local/hestia/conf/hestia.conf
grep -E '^WEB_|^PROXY_' /usr/local/hestia/conf/defaults/hestia.conf

You also need to update /etc/nginx/conf.d/ip.conf

Otherwise it will connect to 8080 and still fail

@omchilin to fix the nginx conf for your ips as @eris is pointing out, you should execute this code.

#!/usr/bin/env bash
source /etc/hestiacp/hestia.conf
source $HESTIA/func/main.sh
source_conf "$HESTIA/conf/hestia.conf"
source $HESTIA/func/domain.sh

if [ "$WEB_SYSTEM" = "nginx" ]; then
        while IFS= read -r IP; do
                echo "Processing $ip_conf"
                cp -f "$HESTIA_INSTALL_DIR"/nginx/unassigned.inc "$ip_conf"
                sed -i "s/directIP/$IP/g" "$ip_conf"
                process_http2_directive "$ip_conf"
        done < <(ls "$HESTIA"/data/ips/ 2> /dev/null)
        echo "Done!"

So, to do it easy, execute this as root:

cd /root/
wget https://gist.sahsanu.net/sahsanu/f0991cc923bf4904beed4a911267cc55/raw/HEAD/change_nginx_ip_conf.sh
chmod +x change_nginx_ip_conf.sh

Thank you everyone for the help, my server is all good now!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.