Hi,

If ALLOWED_HOSTS is not set, you shouldn't see this, unless you're
accessing it with a domain that Django doesn't consider to be a validly
formed domain. It will first check the "Host:" header (as sent by the
client) and, if that's missing, the server name as reported by mod_wsgi.

It would help to know what the actual URL is that you're accessing. Also,
the server name as reported by the server.

Try removing the ALLOWED_HOSTS setting, and then doing this:

    $ rb-site manage /path/to/site shell
    >>> from django.conf import settings
    >>> print settings.ALLOWED_HOSTS

That will just confirm that we're using the proper default.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
Beanbag, Inc. - http://www.beanbaginc.com


On Thu, May 23, 2013 at 7:10 PM, Ryan Guilbault <rguilba...@meditech.com>wrote:

> Hello :-
>
> I recently installed ReviewBoard on a Windows Server 28 R2 Datacenter
> (x64) machine from:
>
> ReviewBoard-1.6.16-py2.7.egg
>
> I'm using the 32-bit Python 2.7 (r27:82525) and the dependencies installed
> from easy_install ReviewBoard, e.g.:
>
> django_evolution-0.6.9-py2.7.egg
> django-1.3.7-py2.7.egg
> Djblets-0.6.28-py2.7.egg
> python_dateutil-1.5-py2.7.egg
> MySQL_python-1.2.4-py2.7-win32.egg
>
> I'm using Apache 2.2.22 with mod_wsgi (which was built and installed by
> someone else) and my configuration from 'rb-site install' looks like:
>
> <VirtualHost *:80>
>     ServerName server.example.com
>     DocumentRoot "E:/ReviewBoard/htdocs"
>
>     # Error handlers
>     ErrorDocument 500 /errordocs/500.html
>
>     WSGIPassAuthorization On
>     WSGIScriptAlias "/rb" "E:/ReviewBoard/htdocs/reviewboard.wsgi/rb"
>
>     <Directory "E:/ReviewBoard/htdocs">
>         AllowOverride All
>         Options -Indexes +FollowSymLinks
>         Allow from all
>     </Directory>
>
>     # Alias static media requests to filesystem
>     Alias /rb/media "E:/ReviewBoard/htdocs/media"
>     Alias /rb/errordocs "E:/ReviewBoard/htdocs/errordocs"
>     Alias /rb/favicon.ico
> "E:/ReviewBoard/htdocs/media/rbcommons/images/favicon.png"
> </VirtualHost>
>
> when I attempt to access the WebUI from the remote host location, I get an
> internal server error (HTTP 500), which is logged in Apache as:
>
> mod_wsgi (pid=2080): Exception occurred processing WSGI script
> 'E:/ReviewBoard/htdocs/reviewboard.wsgi'.
>   File
> "C:\\Python27\\lib\\site-packages\\django-1.3.7-py2.7.egg\\django\\core\\handlers\\wsgi.py",
> line 272, in __call__
>     response = self.get_response(request)
> ...
>   File
> "C:\\Python27\\lib\\site-packages\\django-1.3.7-py2.7.egg\\django\\http\\__init__.py",
> line 179, in get_host
>     "Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): %s" %
> host)
> TemplateSyntaxError: Caught SuspiciousOperation while rendering: Invalid
> HTTP_HOST header (you may need to set ALLOWED_HOSTS): server.example.com
>
> Note: I can access ReviewBoard's WebUI just fine from the machine via
> http://localhost/rb/; the error only occurs when I access it remotely,
> e.g. http://server.example.com/rb/
>
> Most of this technology is new to me (python, django, anything beyond
> basic apache management), so I've been spending a lot of time trying to
> wrap my mind around the issue -- I tried adding:
>
> ALLOWED_HOSTS = ['*']
>
> to E:\ReviewBoard\conf\settings_local.py, but the error persists and I'm
> out of ideas. Note: due to localhost working, part of me believes there
> must be a configuration setting somewhere that refers to localhost, instead
> of the fully qualified server name, but I have been unable to find any such
> references to localhost.
>
> Does anybody have any suggestions on what I can try next?
>
> thanks
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to