Nginx catching all domains without wildcard

2015-12-27 Thread Xavier Cardil Coll
My Nginx config is catching all subdomains without specifying a wildcard. I have created an special config for each subdomain, but seems that all subdomains pass trough the main domain configuration. I have discovered this by removing the subdomains configuration files from nginx.conf and watching

How to fix nginx server returning 302 redirect instead of 200

2015-12-19 Thread Xavier Cardil Coll
On this setup, there is a server directive listening to port 80 that returns www to non www and returns 80 to 443. The second server is Nginx as SSL terminator, so it's an SSL virtual host, that proxies the request to Varnish, and the last server is the last host on the chain, that processes and s