Hello, a long time ago i setup a website: www.vanneerven.net, i enabled certificates with certbot succesfully..
The domain pointed to a ubuntu-server in my lan. I forwarded port 80 in that router to that ubuntu-server. Let's call it server A.
Now i have another domain: www.murdie.nl. The website is running on another ubuntu-server in my lan. Let's call it server B.
On my new website / domain i ran the command 'sudo certbot --nginx' after i pointed my router to forward port 80 to this server B.
My problem is now that when i go to the domain www.murdie.nl the wrong website is shown, it displays the website vanneerven.net. When i look at the certificate it is indeed saying vanneerven.net. Why don't i get i certificate for www.murdie,nl ??? And why is the wrong website shown.
I have ubuntu-server with gunicorn and nginx running on both servers.
My domain is: www.murdie.nl / murdie.nl
I ran this command: first i did 'sudo certbot --nginx' and afterwards 'sudo certbot renew'
It produced this output: Successfully deployed certificate for murdie.nl to /etc/nginx/sites-enabled/murdie
Your existing certificate has been successfully renewed, and the new certificate has been installed.
My web server is (include version): nginx/1.24.0 (Ubuntu)
The operating system my web server runs on is (include version): ubuntu server 22
My hosting provider, if applicable, is: strato.nl
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 2.8.0
This is my nginx config for server B with the website www.murdie.nl what i want't to show:
server {
server_name murdie.nl *.murdie.nl;
client_max_body_size 6M;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/hvn/virtualenvs/murdie/murtie;
}
location / {
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
location /media/ {
root /home/hvn/virtualenvs/murdie/murtie;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/murdie.nl/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/murdie.nl/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = murdie.nl) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name murdie.nl *.murdie.nl;
return 404; # managed by Certbot
}
Many thanx in advanced.