Upgrade Ubuntu 18.04 to 20.04: Error ERR_TOO_MANY_REDIRECTS

Hello,
I tried to upgrade from Ubuntu 18.04 to 20.04 but unfortunately I have a problem after upgrading HestiaCP. All my sites report: ERR_TOO_MANY_REDIRECTS and are unreachable.

Some further details:

  • Using CloudFlare in Full SSL/TLS Configuration;
  • Each domain has configured certificate issued by CloudFlare, with Origin CA certificates;
  • Upgrade from 18.04 to 20.04 successful;
  • After upgrading to Ubuntu 20.04, the websites were reachable
  • I edited the HestiaCP repository (bionic to focal)
  • I then updated HestiCP to version 1.8, no errors.
  • After the HestiaCP update, the websites are unreachable: ERR_TOO_MANY_REDIRECTS

The tests I performed:

  • Reinstalled CloudFlare SSL certificates, including Origin CA Certificate.
  • Enabled and Disabled HTTPS forcing

But unfortunately, the error persists.

I then decided to create, also on the same server, a new account with which I associated a test subdomain.

I obviously associated the subdomain with the same SSL certificate issued by Cloudlfare, and that works. :open_mouth:

So I have, in the same VPS with three accounts:

  • New account “test” associated to test.xxx[.]com and this works (obviously in HTTPS);
  • Old account “api” associated to api.xxx[.]com and gives me the error: ERR_TOO_MANY_REDIRECTS
  • Old account “customers” associated to customers.xxx[.]com and gives me the error: ERR_TOO_MANY_REDIRECTS

All three subdomains have the same SSL certificate issued by Cloudflare with Origin CA certificates.

However, I noticed an anomaly, in the control panel of the new “test” account I have all the usual configured “Web Template”, “Proxy Template” and “Proxy Extension”.

But in the two old accounts I only have the “Web Template” configuration.

Perhaps the NGINX configuration is generating this error in old accounts.

How can I restore the default values in the two old accounts to restore all configuration options? Any other suggestion?

Thanks
Andrea

You did had under 18.04 an Apache2 only setup?

I have never seen this issue before …

Hello,
this was the configuration string used to install the server years ago.

bash hst-install.sh --apache yes --nginx yes --phpfpm no --multiphp no --vsftpd no --proftpd no --named no --mysql yes --postgresql no --exim no --dovecot no --clamav no --spamassassin no --iptables yes --fail2ban yes --quota no --api no --port 8083 --lang en --interactive yes --hostname hestiacp[.]yyy[.]com --email xxx@xxx[.]com

I then restored the server to its previous state, pending resolution, and these are the services in use on Ubuntu 18.04.

Strange I haven’t seen this issue before while upgrading to 20.04 / 18.04

What happens when run v-rebuild-web-domains user?

I currently restored a backup and went back to using Ubuntu 18.04.

I only now realize that even in the historical configuration all the settings “Web Template”, “Proxy Template” and “Proxy Extension” are missing.

I try running v-rebuild-web-domains on ubuntu 18.04 and see what happens?

Still from the current 18.04 server, the configurations are there. But I don’t understand why on HestiaCP I can’t select them :frowning:

r

root@xxxx:/home# v-list-web-templates
TEMPLATE
--------
default
hosting
phpcgi
phpfcgid
www-data
root@xxxx:/home# v-list-web-templates-backend
TEMPLATE
--------
root@xxxx:/home# v-list-web-templates-proxy
TEMPLATE
--------
caching
default
hosting

Okay, I was able to restore the “Proxy Template” and “Proxy Extension” options and they seem to be working properly.

I had to manually edit the /usr/local/hestia/data/users/USERNAME/web.conf file with this configuration:

DOMAIN='subdomain.xxx.com' IP='xxx.xxx.xxx.xxx' IP6='' FASTCGI_DURATION='' FASTCGI_CACHE='' CUSTOM_PHPROOT='' CUSTOM_DOCROOT='' ALIAS='' TPL='default' SSL='yes' SSL_HSTS='yes' SSL_FORCE='no' SSL_HOME='same' LETSENCRYPT='no' FTP_USER='' FTP_PATH='' FTP_MD5='' BACKEND='' PROXY='default' PROXY_EXT='html,htm' STATS='' STATS_USER='' AUTH_HASH='' AUTH_USER='' REDIRECT_CODE='' REDIRECT='' STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no' TIME='12:24:34' DATE='2023-07-28'

Now I have to retry an upgrade… :crossed_fingers:

2 Likes

Hi,
for those who want to upgrade Ubuntu 18.04 to Ubuntu 20.04 and of course also update HestiaCP to 1.8 version below is the procedure I used:

  1. apt update && apt upgrade && apt autoremove && reboot
  2. edit /usr/local/hestia/data/users/USERNAME/web.conf and renable proxy and proxy_ext (see previous message)
  3. run v-rebuild-all USERNAME yes for all username
  4. extract mysql root password from /usr/local/hestia/conf/mysql.conf
  5. change password for sql user “pma” will be requested during the upgrade procedure
  6. upgrade Ubuntu (do-release-upgrade) and reboot
  7. add-apt-repository ppa:ondrej/php && apt install ppa-purge && ppa-purge ppa:ondrej/php (accept any suggestions)
  8. Edit /etc/apt/sources.list.d/hestia.list and change “bionic” to “focal”
  9. apt update && apt upgrade
  10. apt install hestia-php
  11. v-add-sys-dependencies
  12. run v-rebuild-all USERNAME yes for all username
  13. apt install php-zip php-intl
2 Likes

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