You need to remove those entries from your WPCONFIG file. You wordpress is redirecting to www and nginx is redirecting to non www. www and non www are different domains. You want to use one or the other. Non www is recommended. www is an artifact from the beginning of the internet when the same domain had more then just an http/xml web page. rss. usenet. news. aol. were all common for different versions of a site.
Using both www and non www hurts SEO too. Search engines treat both as unique domains and your traffic can get split. Keep the default 301 redirect and always use non www links everywhere. The 301 helps the old folks that cant stop typing www before everything.