Invalid HTTP_HOST header: 'www.ateniesi.it'. You may need to add 'www.ateniesi.it' to ALLOWED_HOSTS.
Request Method: | GET |
---|---|
Request URL: | http://www.ateniesi.it/leopolda-dove-viene-dove-vuole-andare/ |
Django Version: | 5.0.2 |
Exception Type: | DisallowedHost |
Exception Value: | Invalid HTTP_HOST header: 'www.ateniesi.it'. You may need to add 'www.ateniesi.it' to ALLOWED_HOSTS. |
Exception Location: | /var/www/liquity/venv/lib/python3.10/site-packages/django/http/request.py, line 151, in get_host |
Python Executable: | /var/www/liquity/venv/bin/python |
Python Version: | 3.10.12 |
Python Path: | ['/var/www/liquity', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/var/www/liquity/venv/lib/python3.10/site-packages'] |
Server time: | Fri, 29 Mar 2024 11:24:54 +0000 |
/var/www/liquity/venv/lib/python3.10/site-packages/django/core/handlers/exception.py
, line 55, in inner
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: 'www.ateniesi.it'. You may need to add 'www.ateniesi.it' to ALLOWED_HOSTS.") |
get_response | <CommonMiddleware get_response=convert_exception_to_response.<locals>.inner> |
request | <WSGIRequest: GET '/leopolda-dove-viene-dove-vuole-andare/'> |
/var/www/liquity/venv/lib/python3.10/site-packages/django/utils/deprecation.py
, line 133, in __call__
def __call__(self, request):
# Exit out to async mode, if needed
if iscoroutinefunction(self):
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 '/leopolda-dove-viene-dove-vuole-andare/'> |
response | None |
self | <CommonMiddleware get_response=convert_exception_to_response.<locals>.inner> |
/var/www/liquity/venv/lib/python3.10/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()…
if settings.PREPEND_WWW and host and not host.startswith("www."):
# Check if we also need to append a slash so we can do it all
# with a single redirect. (This check may be somewhat expensive,
# so we only do it if we already know we're sending a redirect,
# or in process_response if we get a 404.)
Variable | Value |
---|---|
request | <WSGIRequest: GET '/leopolda-dove-viene-dove-vuole-andare/'> |
self | <CommonMiddleware get_response=convert_exception_to_response.<locals>.inner> |
user_agent | 'claudebot' |
/var/www/liquity/venv/lib/python3.10/site-packages/django/http/request.py
, line 151, in get_host
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 | ['127.0.0.1', 'liquity.hannesnikulski.me', '139.162.144.17'] |
domain | 'www.ateniesi.it' |
host | 'www.ateniesi.it' |
msg | ("Invalid HTTP_HOST header: 'www.ateniesi.it'. You may need to add " "'www.ateniesi.it' to ALLOWED_HOSTS.") |
port | '' |
self | <WSGIRequest: GET '/leopolda-dove-viene-dove-vuole-andare/'> |
[unable to retrieve the current user]
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTEXT_DOCUMENT_ROOT | '/var/www/liquity' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | '/var/www/liquity' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'www.ateniesi.it' |
HTTP_USER_AGENT | 'claudebot' |
PATH_INFO | '/leopolda-dove-viene-dove-vuole-andare/' |
PATH_TRANSLATED | '/var/www/liquity/liquity/wsgi.py/leopolda-dove-viene-dove-vuole-andare/' |
QUERY_STRING | '' |
REMOTE_ADDR | '3.237.232.196' |
REMOTE_PORT | '35138' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/leopolda-dove-viene-dove-vuole-andare/' |
SCRIPT_FILENAME | '/var/www/liquity/liquity/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '139.162.144.17' |
SERVER_ADMIN | 'email@hannesnikulski.me' |
SERVER_NAME | 'www.ateniesi.it' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | '********************' |
SERVER_SOFTWARE | 'Apache/2.4.52 (Ubuntu)' |
apache.version | (2, 4, 52) |
mod_wsgi.application_group | '' |
mod_wsgi.callable_object | 'application' |
mod_wsgi.daemon_connects | '1' |
mod_wsgi.daemon_restarts | '0' |
mod_wsgi.daemon_start | '1711711494141673' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
mod_wsgi.ignore_activity | '0' |
mod_wsgi.listener_host | '' |
mod_wsgi.listener_port | '80' |
mod_wsgi.path_info | '/leopolda-dove-viene-dove-vuole-andare/' |
mod_wsgi.process_group | 'liquity' |
mod_wsgi.queue_start | '1711711494141613' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_id | 'HfaQ42IkOIU' |
mod_wsgi.request_start | '1711711494141469' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1711711494141774' |
mod_wsgi.thread_id | 6 |
mod_wsgi.thread_requests | 16 |
mod_wsgi.total_requests | 611 |
mod_wsgi.version | (4, 9, 0) |
wsgi.errors | <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'> |
wsgi.file_wrapper | <class 'mod_wsgi.FileWrapper'> |
wsgi.input | <mod_wsgi.Input object at 0x7fb178344500> |
wsgi.input_terminated | True |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
liquity.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['127.0.0.1', 'liquity.hannesnikulski.me', '139.162.144.17'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'users.User' |
BASE_DIR | PosixPath('/var/www/liquity') |
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_HEALTH_CHECKS': False, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': PosixPath('/var/www/liquity/db.sqlite3'), 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': ''}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATA_UPLOAD_MAX_NUMBER_FILES | 100 |
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_DRINK_IMAGE | PosixPath('/var/www/liquity/media/drink.png') |
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_INDEX_TABLESPACE | '' |
DEFAULT_PROFILE_IMAGE | PosixPath('/var/www/liquity/media/profile.png') |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.console.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 |
FORMS_URLFIELD_ASSUME_HTTPS | False |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'widget_tweaks', 'users.apps.UsersConfig', 'app.apps.AppConfig', 'api.apps.ApiConfig', 'actions.apps.ActionsConfig'] |
INTERNAL_IPS | [] |
LANGUAGES | (('de', 'German'), ('en', 'English')) |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'ckb', 'fa', 'ug', 'ur'] |
LANGUAGE_CODE | 'en' |
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 | [PosixPath('/var/www/liquity/locale')] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/drinks' |
LOGIN_URL | '/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | PosixPath('/var/www/liquity/media') |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'liquity.urls' |
SECRET_KEY | '********************' |
SECRET_KEY_FALLBACKS | '********************' |
SECURE_CONTENT_TYPE_NOSNIFF | True |
SECURE_CROSS_ORIGIN_OPENER_POLICY | 'same-origin' |
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 | 'liquity.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 | [PosixPath('/var/www/liquity/assets')] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | PosixPath('/var/www/liquity/static') |
STATIC_URL | '/static/' |
STORAGES | {'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'}, 'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'}} |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [PosixPath('/var/www/liquity/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 | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
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 | 'liquity.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.