I want to have a custom domain for my custom app in ERPNext. How can I do it?
I have followed the next guides:
- Adding Custom Domains to your Site
- Setup DNS based Multitenancy
- Using Let’s Encrypt to setup HTTPS
- Configuring HTTPS
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
- The following errors where reported by the server:
Details: DNS problem: NXDOMAIN looking up A for
There was a problem trying to setup SSL for your site
What I can be doing wrong?
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.
Hope this helps.
Your frappe app server must have its own IP address. Say 220.127.116.11
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 18.104.22.168
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 22.214.171.124
On your app server:
From within frappe-bench folder create a site called myapp.vazdan.com