(You can see this pretty-printed at
I made some minor changes to our nginx config on Friday (deploying SSL
certs: adding a server listening on 443 with the appropriate settings
and adding a couple rewrite rules to forward certain requests to it) and
all of a sudden our URLs started getting extra "/.com"s inserted into
them. For example, clicking a link to http://domain.com/logout/ takes
the user to http://domain.com/logout/.com/. http://domain.com/register/
forwards to http://domain.com/.com/register/. This doesn’t happen with
a subdomain (e.g. http://production.domain.com/logout/ just works) and
it also doesn’t happen with https://domain.com/ (so right now, as a
workaround, the entire site is being served with https).
Our nginx serves static content and proxies dynamic requests to Apache,
which is pretty standard for Django. This had been working fine for
months; I have no idea why it stopped working. I can’t even be sure the
problem is at the nginx level, but that’s the only thing I changed, so
that’s where my attention has been.
Any help/suggestions would be greatly appreciated.
Here are the relevant config files (again, the link above has this
Posted at Nginx Forum: