On Sep 7, 1:23 pm, Siddhi <[EMAIL PROTECTED]> wrote: > On Sep 5, 3:22 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > > > If you are using WSGI interface to Django, then all you need to do is > > wrap Django in a simple WSGI application wrapper that overrides > > SERVER_NAME and sets it to what you want. For example: > > Hi Graham, > > Thanks, thats one good option. > > I'm still confused about the difference between HTTP_HOST and > SERVER_NAME. Is it that one has the IP and the other has the name?
HTTP_HOST is what the client sends in the 'Host' request header and should really be what was used as the host in the URL. SERVER_NAME on the other hand is what the server believes is it host name. If a server had numerous aliases, then one could see different names in HTTP_HOST which would all be valid, but SERVER_NAME would always be the same value. In practice this is a rather simplistic explanation as there is a lot more to it than that, and the value of HTTP_HOST can be affected by the presence of proxies and the version of the HTTP protocol being used. By rights you should be doing what you can to ensure that SERVER_NAME is correct in the first place. As already suggested, if one was using Apache, that would mean setting Apache ServerName directory to the IP address of the machine if it doesn't have a proper host name that clients identify it as. Since you are using ToolServer, tell it somehow to use the IP address instead of 'localhost' as the server name. This may be part of how you tell it what host to listen on for socket connections. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
