Issue Part 1:
I have one site doamain.in and I’m using Domain base multitancy in production
but when I’m try to access www.domain.in it’s not accesible
For Solving above problem I create short link of doamain.in folde inside sites folder to www.domain.in
Now It’s working but this create another issue
Issue Part 2:
I setup ssl with domain.in using bench command
and also setup ssl for www.domain.in with same command
but now which ever setup last from doamin.in/www.domain.in is only working another one giving error Your connection is not private
What is right way to achive this?
My 3 cents of suggestion. I was also struggling with same problem recently.
a) Remove the shortlink that you created in sites folder to link www.domain.in to domain.in
b) To point multiple domain to same site, Please run the below commands -
bench setup add-domain --site domain.in domain.in
bench setup add-domain --site domain.in www.domain.in
bench setup nginx
sudo service nginx restart
c) To configure the SSL to multiple domain, please run the below command -
bench setup lets-encrypt domain.in --custom-domain domain.in
bench setup lets-encrypt domain.in --custom-domain www.domain.in
Hope this works for you.