Hi Collin,

that's a 'yes' to all three questions (loading settings for wrong website 
was no question).

In the meantime I have found the "error":

As I wrote below my ALLOW_HOSTS variable was a tuple of ordinary strings 
("www.example.com") as in the documentation. Using instead unicode strings 
(u"www.example.com") solved the problem.

Thanks for your answer.

Andi

Am Donnerstag, 22. Januar 2015 04:49:41 UTC+1 schrieb Collin Anderson:
>
> Hi,
>
> So django is rejecting hosts even though they are listed in ALLOWED_HOSTS? 
> Are you using apache/mod_wsgi by chance? It could be loading the settings 
> for the wrong website. I assume you are reloading the server in between 
> changes to the file.
>
> Collin
>
> On Monday, January 19, 2015 at 1:18:11 PM UTC-5, andi-h wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE----- 
>> Hash: SHA1 
>>
>> Hi folks, 
>>
>> after upgrading my project to Django 1.7 it seems my host validation 
>> got a bit out of control. I have tried these possibilities, but my web 
>> server continues to send lots of mail about invalid HTTP_HOST headers: 
>>
>> ALLOWED_HOSTS = [ ".example.com" ] # domain name changed ;) 
>> ALLOWED_HOSTS = [ "example.com", "www.example.com" ] 
>>
>> But in each case I get the mails about "www.example.com". Has anybody 
>> else encountered this? 
>>
>> CU Andi 
>> - -- 
>> Andreas Pritschet 
>> Phone:       +49 151 11728439 
>> Homepage:    http://www.pritschet.me 
>> GPG Pub Key: http://goo.gl/4mOsM 
>> -----BEGIN PGP SIGNATURE----- 
>> Version: GnuPG v1 
>>
>> iQIcBAEBAgAGBQJUvUojAAoJEO0gsAalef15wqIP/3BBybnA6ZhBiIw33gnXa/TX 
>> vYJrqcLv6mFQ4s7UmR4wxdTo+IfjZhhEx0p4qEqxOArPahdObAoO8KQEoFSanO3f 
>> VVCq7EBSS84g26/NrVfudyERgjxPbLvVL9L7vUbSxNuT5HYBW0IXqWOXUhkq8VsK 
>> gGGZkbQft8IH3jK28FNnNAJ+6PVY9yL2NDgB475Y6IlLqJHaXZYLl46U9ZbdTrF4 
>> apJUmoaorZ1ul5Ga1Xkj8c97RSfyQwK2EH6IQ7Vb2U7Ad/5sDsVKC/Kx6hxt2fbR 
>> ZkWPqVXAs7SbZIwAyeUggVEhz6n0XKzAYk7lsbNOzitwAWIXuzqk+5Hu/anDsTmt 
>> lS144lIyhuIKNPgwv02eNg4wH5hytXwK+kf1Z/4H+LcNu5szxMtREb2/PBvm/nQC 
>> zoJYZV1+sTmSjKKOb8DoX5i+dVdhgbQzvu/XBIJBLbUn4NSQiAlEKnArBeD2H01Z 
>> K1u37aIITOgcFqigDnLQEfIfzl+nng/O22W9RISPEOMyjE+9wcmgYXiKAt1RY2C5 
>> LjJQwhIkb94Aqzv288ip2131NxZq/eoGO8neQNBRRM4BoYbeP9gDT9D+BF8bnkQL 
>> FO5emHWj7oLdtcUteyMKKgdP/ryrwHiAQ2MBUIMVfPmmmCD2PN1M8v6nmPV0mbCH 
>> dQ6GeHlr/6Gh3rpoNFb/ 
>> =L0Pv 
>> -----END PGP SIGNATURE----- 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8e0ba7fe-1830-4f6f-aec8-277dc2f5d59d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to