The problem I am facing is I can reach my site with Staff Login but I can't reach the same site with https://www.tapme.dk/login_staff. In my DNS I have 3 A records all pointing to the same server IP
- A record : *.tapme.dk
- A record : tapme.dk
- A record : www.tapme.dk
After having run the command sudo certbot --nginx my www.tapme.dk.conf is as below. When I
curl -L Staff Login
I get the expected output from my site
but when I curl -L https://www.tapme.dk/login_staff
I get this error
jianwu@localhost:~/review_fountain/reviewstream$ curl -L https://www.tapme.dk/login_staff
curl: (60) SSL: no alternative certificate subject name matches target host name 'www.tapme.dk'
More details here: curl - SSL CA Certificates
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: https://tapme.dk
I ran this command: sudo certbot --nginx
It produced this output:
my /etc/nginx/sites-available/www.tapme.dk.conf output the below file after running the sudo certbot --nginx command
server_tokens off;
access_log /home/jianwu/review_fountain/reviewstream/reviewstream/nginx_access.log;
error_log /home/jianwu/review_fountain/reviewstream/reviewstream/nginx_error.log;
# This configuration will be changed to redirect to HTTPS later
server {
server_name .tapme.dk;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
}
location /static {
autoindex on;
alias /home/jianwu/review_fountain/reviewstream/productionStatic;
}
location /media {
autoindex on;
alias /home/jianwu/review_fountain/reviewstream/media;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/www.tapme.dk/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.tapme.dk/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 = www.tapme.dk) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name .tapme.dk;
listen 80;
return 404; # managed by Certbot
}
My web server is (include version): nginx/1.24.0 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 22.04
My hosting provider, if applicable, is:
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):
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot):