It produced this output: Failed authorization procedure. www.mlcnfriends.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to mclnfriends.com
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
My operating system is (include version): FreeBSD 10.3
My web server is (include version): nginx (latest)
My hosting provider, if applicable, is: self hosted
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
I’m having a bit of trouble getting the certificate for the www prefix for my domains. I have successfully obtained certificates for mlcnfriends.com and boredguy.showersnet.com. When I add the www prefix to either URL it fails. I have a redirect to https set up on both domains with SSL termination handled by an nginx proxy. The certificate renewall process also works from cron for both domains. I have the A record set up at namecheap for www for both domains and it does resolve correctly so I’m stumped as to why it won’t work. Any help you can provide would be great. Thanks for your time.
Is this a straight copy of the errors, or have you retyped it ? in some placed the second and third characters of the domain name are the wrong way round mclnfriends.com and mlcnfriends.com. Just checking if that’s just on here, or if there was a typo in the actual command you were running
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
Output: Failed authorization procedure. www.mlcnfriends.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to mclnfriends.com
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
Well that’s why there is an issue ( that the file can’t be reached, rather than the redirect). You need to check why it can’t reach that file ( probably something in your .htaccess or config )
That doesn't make any sense at all. I have a 301 rewrite to https and always have. My config files don't contain any typo's so I'm not sure what's going on there.
Well I'm going to have to investigate that because I have a location in my server block to allow access to that location:
Looking at the error log it looks like it’s trying to connect to the wrong directory. Not sure why since mlcnfriends.com was issued a cert but www.mlcnfriends.com produces this error in the nginx error log:
“/usr/local/etc/nginx/html/.well-known/acme-challenge/ULP8x7iZI-vStfFCooMZGGqOjmAniOz0P9cyCLx5a_s” failed (2: No such file or directory)
So /usr/local/etc/nginx/html/ is your webroot for the www-domain, not/usr/local/etc/nginx/ (in your first post) nor /usr/local/www/nginx (in your third post).