Change redirect (url1 -> url2) from one server to another (url1 -> url3)

The Story:
We have a server with nginx with url (meet2) that has a redirect meet1 -> meet2. We have since created a better server and setup meet3. I would like to change the redirect from meet1 -> meet2 to meet1 -> meet3 taking meet2 out of the equation.

I have:

  • updated the meet1 A record to reflect meet3 server IP

  • created nginx config on meet3 server:
    server {
    listen 80;
    server_name meet.ducharme.co.za;

    return 301 $scheme://meet3.ducharme.co.za$request_uri;
    }

But I am failing the domain challenge.

I assumed with the A Record IP update on meet.ducharme would be sufficient.

Any help would be appreciated.
Thank you in advance.

My domain is:
meet.ducharme.co.za
meet2.ducharme.co.za
meet3.ducharme.co.za

I ran this command:
sudo certbot --nginx -d meet.ducharme.co.za -d www.meet.ducharme.co.za

It produced this output:
Challenge failed for domain www.meet.ducharme.co.za

My web server is (include version):
Nginx (Latest) - (EDIT) nginx/1.18.0 (ubuntu)

The operating system my web server runs on is (include version):
Ubuntu 22.04

I can login to a root shell on my machine (yes or no, or I don't know):
Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
Certbot 0.40.0

Hi @XanDucharme, and welcome to the LE community forum :slight_smile:

That is the apt version and is very old.
Please follow the recommended installation instructions for Ubuntu 20 [they work for 22]:
Certbot Instructions | Certbot (eff.org)

That is NOT a version.
"Latest" means different things to different people/on different distros.

There is no DNS entry for the "www" name:
8.8.8.8 can't find www.meet.ducharme.co.za: Non-existent domain

4 Likes

Hey @rg305

Thank you for the fast response and welcome message.

Firstly, apologies for the Nginx version error. I did not have the ability to SSH into the machine and check the version at the time of writing the post and assumed that would be better than adding no versioning info at all. I will however ensure I have all required information next time.

Regarding the actual issue, I cannot believe I didn't notice it specified the www. I was definitely hasty with changing this redirect and didn't pay proper attention. I removed that from the config (as it's not a requirement) and it worked flawlessly.

Have a great day!

1 Like

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