Invalid HTTP_HOST header: 'bgninmobiliaria.com'. You may need to add 'bgninmobiliaria.com' to ALLOWED_HOSTS.
Request Method: | GET |
---|---|
Request URL: | https://bgninmobiliaria.com/buscamosporti/151 |
Django Version: | 3.2.10 |
Exception Type: | DisallowedHost |
Exception Value: | Invalid HTTP_HOST header: 'bgninmobiliaria.com'. You may need to add 'bgninmobiliaria.com' to ALLOWED_HOSTS. |
Exception Location: | /home/bgninmobiliaria/venv/lib/python3.9/site-packages/django/http/request.py, line 149, in get_host |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.9.2 |
Python Path: | ['/home/bgninmobiliaria/venv', '/home/bgninmobiliaria/venv/lib/python3.9/site-packages', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/dist-packages', '/usr/lib/python3/dist-packages', '/home/bgninmobiliaria/repository/bgninmobiliaria/..'] |
Server time: | Thu, 28 Mar 2024 13:04:21 +0000 |
/home/bgninmobiliaria/venv/lib/python3.9/site-packages/django/core/handlers/exception.py
, line 47, in inner
response = await sync_to_async(response_for_exception, thread_sensitive=False)(request, exc)
return response
return inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | DisallowedHost("Invalid HTTP_HOST header: 'bgninmobiliaria.com'. You may need to add 'bgninmobiliaria.com' to ALLOWED_HOSTS.") |
get_response | <django.middleware.common.CommonMiddleware object at 0x7f4559f13fa0> |
request | <WSGIRequest: GET '/buscamosporti/151'> |
/home/bgninmobiliaria/venv/lib/python3.9/site-packages/django/utils/deprecation.py
, line 116, in __call__
def __call__(self, request):
# Exit out to async mode, if needed
if asyncio.iscoroutinefunction(self.get_response):
return self.__acall__(request)
response = None
if hasattr(self, 'process_request'):
response = self.process_request(request)…
response = response or self.get_response(request)
if hasattr(self, 'process_response'):
response = self.process_response(request, response)
return response
async def __acall__(self, request):
Variable | Value |
---|---|
request | <WSGIRequest: GET '/buscamosporti/151'> |
response | None |
self | <django.middleware.common.CommonMiddleware object at 0x7f4559f13fa0> |
/home/bgninmobiliaria/venv/lib/python3.9/site-packages/django/middleware/common.py
, line 48, in process_request
user_agent = request.META.get('HTTP_USER_AGENT')
if user_agent is not None:
for user_agent_regex in settings.DISALLOWED_USER_AGENTS:
if user_agent_regex.search(user_agent):
raise PermissionDenied('Forbidden user agent')
# Check for a redirect based on settings.PREPEND_WWW
host = request.get_host()…
must_prepend = settings.PREPEND_WWW and host and not host.startswith('www.')
redirect_url = ('%s://www.%s' % (request.scheme, host)) if must_prepend else ''
# Check if a slash should be appended
if self.should_redirect_with_slash(request):
path = self.get_full_path_with_slash(request)
Variable | Value |
---|---|
request | <WSGIRequest: GET '/buscamosporti/151'> |
self | <django.middleware.common.CommonMiddleware object at 0x7f4559f13fa0> |
user_agent | 'claudebot' |
/home/bgninmobiliaria/venv/lib/python3.9/site-packages/django/http/request.py
, line 149, in get_host
return host
else:
msg = "Invalid HTTP_HOST header: %r." % host
if domain:
msg += " You may need to add %r to ALLOWED_HOSTS." % domain
else:
msg += " The domain name provided is not valid according to RFC 1034/1035."
raise DisallowedHost(msg)…
def get_port(self):
"""Return the port number for the request as a string."""
if settings.USE_X_FORWARDED_PORT and 'HTTP_X_FORWARDED_PORT' in self.META:
port = self.META['HTTP_X_FORWARDED_PORT']
else:
Variable | Value |
---|---|
allowed_hosts | ['www.bgninmobiliaria.com'] |
domain | 'bgninmobiliaria.com' |
host | 'bgninmobiliaria.com' |
msg | ("Invalid HTTP_HOST header: 'bgninmobiliaria.com'. You may need to add " "'bgninmobiliaria.com' to ALLOWED_HOSTS.") |
port | '' |
self | <WSGIRequest: GET '/buscamosporti/151'> |
[unable to retrieve the current user]
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTEXT_DOCUMENT_ROOT | '/home/bgninmobiliaria/repository' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | '/home/bgninmobiliaria/repository' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'bgninmobiliaria.com' |
HTTP_REFERER | 'http://bgninmobiliaria.com/buscamosporti/151' |
HTTP_USER_AGENT | 'claudebot' |
PATH_INFO | '/buscamosporti/151' |
PATH_TRANSLATED | '/home/bgninmobiliaria/repository/bgninmobiliaria/wsgi.py/buscamosporti/151' |
QUERY_STRING | '' |
REMOTE_ADDR | '44.204.65.189' |
REMOTE_PORT | '37866' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'https' |
REQUEST_URI | '/buscamosporti/151' |
SCRIPT_FILENAME | '/home/bgninmobiliaria/repository/bgninmobiliaria/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '51.91.180.69' |
SERVER_ADMIN | 'pamores@inforcode.com' |
SERVER_NAME | 'bgninmobiliaria.com' |
SERVER_PORT | '443' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | '********************' |
SERVER_SOFTWARE | 'Apache/2.4.54 (Debian)' |
SSL_TLS_SNI | 'bgninmobiliaria.com' |
apache.version | (2, 4, 46) |
mod_wsgi.application_group | 'bgninmobiliaria.com|' |
mod_wsgi.callable_object | 'application' |
mod_wsgi.daemon_connects | '1' |
mod_wsgi.daemon_restarts | '0' |
mod_wsgi.daemon_start | '1711631061215677' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
mod_wsgi.ignore_activity | '0' |
mod_wsgi.listener_host | '' |
mod_wsgi.listener_port | '443' |
mod_wsgi.path_info | '/buscamosporti/151' |
mod_wsgi.process_group | 'bgninmobiliaria' |
mod_wsgi.queue_start | '1711631061215557' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_id | 'rOhjKXCjGGk' |
mod_wsgi.request_start | '1711631061215404' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1711631061215751' |
mod_wsgi.thread_id | 2 |
mod_wsgi.thread_requests | 845 |
mod_wsgi.total_requests | 1794 |
mod_wsgi.version | (4, 7, 1) |
wsgi.errors | <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'> |
wsgi.file_wrapper | <class 'mod_wsgi.FileWrapper'> |
wsgi.input | <mod_wsgi.Input object at 0x7f455995a810> |
wsgi.input_terminated | True |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'https' |
wsgi.version | (1, 0) |
bgninmobiliaria.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['www.bgninmobiliaria.com'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/home/bgninmobiliaria/repository' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'localhost', 'NAME': 'bgninmobiliaria', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'bgninmobiliaria'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_AUTO_FIELD | 'django.db.models.BigAutoField' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_EXCEPTION_REPORTER | 'django.views.debug.ExceptionReporter' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_HASHING_ALGORITHM | 'sha256' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'smtp.gmail.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | '587' |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | 420 |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['web', 'adminsortable2', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'rangefilter', 'tinymce', 'easy_thumbnails', 'django_cleanup.apps.CleanupConfig', 'django_user_agents'] |
INTERNAL_IPS | [] |
LANGUAGES | (('es', 'Spanish'),) |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'fa', 'ur'] |
LANGUAGE_CODE | 'es' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_HTTPONLY | False |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LANGUAGE_COOKIE_SAMESITE | None |
LANGUAGE_COOKIE_SECURE | False |
LOCALE_PATHS | ('/home/bgninmobiliaria/repository/locale',) |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/home/bgninmobiliaria/repository/media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django_user_agents.middleware.UserAgentMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'bgninmobiliaria.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | True |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_REFERRER_POLICY | 'same-origin' |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'bgninmobiliaria.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/home/bgninmobiliaria/repository/staticfiles' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
THUMBNAIL_ALIASES | {'web.Imagen.fichero': {'gallery': {'ALIAS': 'gallery', 'crop': 'scale', 'size': (800, 600)}, 'grid': {'ALIAS': 'grid', 'crop': 'smart', 'size': (385, 310)}, 'thumbnail': {'ALIAS': 'thumbnail', 'crop': 'smart', 'size': (170, 130)}}} |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
TINYMCE_DEFAULT_CONFIG | {'custom_undo_redo_levels': 10, 'menubar': 'file edit view insert format tools table help', 'plugins': 'advlist autolink lists link image charmap print preview anchor ' 'searchreplace visualblocks code ', 'toolbar': 'undo redo | bold italic underline strikethrough | fontselect ' 'fontsizeselect formatselect | alignleft aligncenter alignright ' 'alignjustify | outdent indent | numlist bullist checklist | ' 'forecolor backcolor casechange permanentpen formatpainter ' 'removeformat | pagebreak | charmap emoticons | fullscreen ' 'preview save print | insertfile image media pageembed template ' 'link anchor codesample | a11ycheck ltr rtl | showcomments ' 'addcomment code'} |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'bgninmobiliaria.wsgi.application' |
X_FRAME_OPTIONS | 'DENY' |
YEAR_MONTH_FORMAT | 'F Y' |
You’re seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.