I suppose that the configuration fails when I set the custom domain with the command bench setup add-domain [custom-domain] because, when I try to use the command sudo -H bench setup lets-encrypt [site-name] --custom-domain [custom-domain], I get this error:
Failed authorization procedure. custom.domain.com (http-01): urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up A for custom.domain.com
IMPORTANT NOTES:
- The following errors where reported by the server:
Domain: custom.domain.com
Type: None
Details: DNS problem: NXDOMAIN looking up A for
custom.domain.com
There was a problem trying to setup SSL for your site
Is your custom domain live?
And did you point ur custom domains A record to the erpnext server IP ?
Above error says that dns lookup for ur domain failed to get any A record.
Your frappe app server must have its own IP address. Say 123.123.123.1
Say your domain name is vazdan.com
If you want your frappe app to resolve at vazdan.com
Your vazdan.com DNS Zone File’s primary A Record must point towards this IP 123.123.123.1
If you have an existing website at vazdan.com (located at say 456.456.456.4) and you want your frappe app to resolve to a subdomain like myapp.vazdan.com You need to add a second A record to your vazdan.com DNS Zone File that points to your frappe app server. Your primary A record points to your website at 456.456.456.4 Then add another A record myapp.vazdan.com with an IP address of 123.123.123.1
On your app server:
From within frappe-bench folder create a site called myapp.vazdan.com