I'm having a problem getting satchmo to work in a multi-site
environment (latest of satchmo, threaded-multihost, and everything
else). I think it's threaded-multihost that's killing me. I seem to be
doing something threaded-multihost doesn't expect.
What i'm doing is serving two satchmo sites off the same host. For
example, if my host is "
mycars.com", I have one satchmo store at
"
mycars.com/vw" that sells Volkswagen-related products, and another
store at "
mycars.com/corvette" that sells Corvette-related products.
I'm running apache+mod_wsgi (on debian stable), and so my httpd.conf
has two WSGIScriptAlias entries: one for /corvette and one for /vw.
Each points to its own wsgi file, each of which in turn points to a
particular settings file. The vw settings file has SITE_ID = 2 and the
corvette settings file has SITE_ID = 1. But threaded-multihost seems
to be ignoring that and trying to look up by hostname, which is not
unique in my case since both sites have a domain of '
mycars.com'.
The problem manifests itself in a few different ways, depending on how
I have things configured. If none of my django_site records match
(e.g. django_site.domain records are set to '
mycars.com' and I am
browsing to '10.10.20.20') then threaded-multihost goes into an
infinite loop and eventually throws a 'maximum recursion depth
exceeded' error. If multiple django_site records match (e.g.
django_site.domain records are all set to
mycars.com and I browse to
mycars.com) then I get an 'expected one but got two' error originating
from threaded-multihost querying by hostname. The way I can actually
get it to (kind of) work is by adding /etc/hosts records on my client
machine, e.g. having both '
myvw.com' and '
myvette.com' resolve to
'
mycars.com'. Then I can use those domains in my django_site records.
The problem with this approach is that when I browse to
"
myvw.com/corvette" I get VW products, and when I browse to
"
myvette.com/vw" I get Corvette products -- if you see what I mean.
Because threaded-multihost is looking up by hostname and hijacking my
SITE_ID, I guess you could say.
To reiterate, I don't want two unique domains. I want one domain to
host two satchmo sites, one in /vw and one in /corvette.
This used to work with the server I had setup from sources circa
February, but now, with latest of everything, it doesn't work.
Sorry for so many gory details. I am hoping this makes sense to
someone out there. Thanks in advance for any insight you can lend!
--Stuart
--
You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to
satchm...@googlegroups.com.
To unsubscribe from this group, send email to
satchmo-user...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en.