On 4/24/23 4:53 PM, Mark London wrote:
Mark - I encountered the same problem and it wasn't clear from the documentation what to do about it.
So I eventually changed the name from example.com using the /admin link.
But if I now set SITE_ID = 0, and restart the server, it is not happy and tells me it encountered an error.
raise self.model.DoesNotExist(django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
I'm not sure about this. It may only work if there is more than one site. On the other hand, it requires that the requesting domain match a site. I.e., I think if the site's domain is example.com, but the request is from www.example.com, that could cause it to fail.
Also, if proxying to a wsgi server, the web server has to pass the host. I.e., for nginx,
proxy_set_header Host $host
and for Apache
ProxyPreserveHost On
I guess I should just let it be set to 1 and be done with it? - Mark
Yes, I think so.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan