I configured erpnext to work at https://example.com and it’s working fine. But when we open the website for the first time in other computers , it opens at https://www.example.com which causes ssl cert error and erpnext site error like “Sorry! We will be back soon.” I need the site to redirect to https://example.com by default.
I tried searching for answers in this forum and tried below steps
Added A record in both godaddy and digitalocean
Added
server {
listen 80;
server_name www.example.com;
return 301 https://$host$request_uri;
}
in frappe-bench/config/nginx.config but failed to make it work. Please correct me if I am missing anything.
Thanks @kolate_sambhaji But when I do a new setup production I will have to modify the configuration again.
Maybe it would be good if the bench command generates the rewrite.
I’will .
I’m going to use your solution equally.
@kickapoo Thanks for you answer.
I had configured SSL following these post but still doesn’t works the domain with www.
Another thing that I should check or config?