Recently I was working on Nginx webserver with multiple website. Problem I was facing was that my first website was working fine using www.firstdomain.com and firstdomain.com. But on the second domain my website www.seconddomain.com was being redirected to first domain and using seconddomain.com was working fine.
I tried :
I tried :
server_name www.seconddomain.com;
even
server_name seconddomain.com;
but then I was able to solve this issue by :
server_name .seconddomain.com;
server_name .firstdomain.com;
In their respective files under the sites-enabled directory:
and then service nginx restart
No comments:
Post a Comment