Invalid HTTP_HOST header: 'modbuilders.jp'. You may need to add 'modbuilders.jp' to ALLOWED_HOSTS.
Request Method: | GET |
---|---|
Request URL: | http://modbuilders.jp/ |
Django Version: | 1.11.29 |
Exception Type: | DisallowedHost |
Exception Value: | Invalid HTTP_HOST header: 'modbuilders.jp'. You may need to add 'modbuilders.jp' to ALLOWED_HOSTS. |
Exception Location: | /usr/local/lib/python3.8/dist-packages/django/http/request.py in get_host, line 113 |
Python Executable: | /usr/bin/python3 |
Python Version: | 3.8.10 |
Python Path: | ['/rayflood/public/modbuilders', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] |
Server time: | 火, 19 3月 2024 19:29:42 +0900 |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response, assigned=available_attrs(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: 'modbuilders.jp'. You may need to add 'modbuilders.jp' to ALLOWED_HOSTS.") |
get_response | <bound method BaseHandler._legacy_get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f7f3b39aeb0>> |
request | <WSGIRequest: GET '/'> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py
in _legacy_get_response
"""
Apply process_request() middleware and call the main _get_response(),
if needed. Used only for legacy MIDDLEWARE_CLASSES.
"""
response = None
# Apply request middleware
for middleware_method in self._request_middleware:
response = middleware_method(request)...
if response:
break
if response is None:
response = self._get_response(request)
return response
Variable | Value |
---|---|
middleware_method | <bound method CommonMiddleware.process_request of <django.middleware.common.CommonMiddleware object at 0x7f7f3ac80a60>> |
request | <WSGIRequest: GET '/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f7f3b39aeb0> |
/usr/local/lib/python3.8/dist-packages/django/middleware/common.py
in process_request
# Check for denied User-Agents
if 'HTTP_USER_AGENT' in request.META:
for user_agent_regex in settings.DISALLOWED_USER_AGENTS:
if user_agent_regex.search(request.META['HTTP_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 '/'> |
self | <django.middleware.common.CommonMiddleware object at 0x7f7f3ac80a60> |
/usr/local/lib/python3.8/dist-packages/django/http/request.py
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 | ['www1.modbuilders.jp', 'www2.modbuilders.jp'] |
domain | 'modbuilders.jp' |
host | 'modbuilders.jp' |
msg | ("Invalid HTTP_HOST header: 'modbuilders.jp'. You may need to add " "'modbuilders.jp' to ALLOWED_HOSTS.") |
port | '' |
self | <WSGIRequest: GET '/'> |
[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/html' |
CONTEXT_PREFIX | '' |
DOCUMENT_ROOT | '/var/www/html' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HTTP_ACCEPT | '*/*' |
HTTP_HOST | 'modbuilders.jp' |
HTTP_USER_AGENT | 'claudebot' |
PATH_INFO | '/' |
PATH_TRANSLATED | '/rayflood/public/modbuilders/modbuilders/wsgi.py/' |
QUERY_STRING | '' |
REMOTE_ADDR | '54.242.75.224' |
REMOTE_PORT | '56086' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'http' |
REQUEST_URI | '/' |
SCRIPT_FILENAME | '/rayflood/public/modbuilders/modbuilders/wsgi.py' |
SCRIPT_NAME | '' |
SERVER_ADDR | '192.168.3.8' |
SERVER_ADMIN | '[no address given]' |
SERVER_NAME | 'modbuilders.jp' |
SERVER_PORT | '80' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SIGNATURE | '' |
SERVER_SOFTWARE | 'Apache' |
apache.version | (2, 4, 41) |
mod_wsgi.application_group | 'modbuilders.jp|' |
mod_wsgi.callable_object | 'application' |
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 | '/' |
mod_wsgi.process_group | '' |
mod_wsgi.request_handler | 'wsgi-script' |
mod_wsgi.request_id | 'hpLK8/iw/Yw' |
mod_wsgi.request_start | '1710844182958726' |
mod_wsgi.script_name | '' |
mod_wsgi.script_reloading | '1' |
mod_wsgi.script_start | '1710844182959071' |
mod_wsgi.thread_id | 8 |
mod_wsgi.thread_requests | 0 |
mod_wsgi.total_requests | 7 |
mod_wsgi.version | (4, 6, 8) |
wsgi.errors | <_io.TextIOWrapper name='<wsgi.errors>' encoding='utf-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <mod_wsgi.Input object at 0x7f7f3a850570> |
wsgi.input_terminated | True |
wsgi.multiprocess | True |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
modbuilders.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['www1.modbuilders.jp', 'www2.modbuilders.jp'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ('mezzanine.core.auth_backends.MezzanineBackend',) |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | '/rayflood/public/modbuilders' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
COMMENTS_APP | 'mezzanine.generic' |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
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.sqlite3', 'HOST': '', 'NAME': '/rayflood/public/modbuilders/dev.db', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': ''}} |
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', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] |
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_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
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_TABLESPACE | '' |
DEV_SERVER | False |
DISALLOWED_USER_AGENTS | [] |
DJANGO_VERSION | (1, 11, 29, 'final', 0) |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'localhost' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '' |
EMAIL_PORT | 25 |
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 | False |
FILE_CHARSET | 'utf-8' |
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' |
GRAPPELLI_INSTALLED | True |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ('mezzanine.boot', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.redirects', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.sitemaps', 'mezzanine.conf', 'mezzanine.core', 'mezzanine.generic', 'mezzanine.pages', 'mezzanine.blog', 'mezzanine.forms', 'mezzanine.galleries', 'mezzanine.twitter', 'filebrowser_safe', 'grappelli_safe', 'django.contrib.admin', 'django.contrib.staticfiles', 'django_comments') |
INTERNAL_IPS | [] |
LANGUAGES | (('ja', '日本語'),) |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'ja' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/rayflood/public/modbuilders/media' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.cookie.CookieStorage' |
MIDDLEWARE | None |
MIDDLEWARE_CLASSES | ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'mezzanine.core.request.CurrentRequestMiddleware', 'mezzanine.core.middleware.RedirectFallbackMiddleware', 'mezzanine.core.middleware.TemplateForDeviceMiddleware', 'mezzanine.core.middleware.TemplateForHostMiddleware', 'mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware', 'mezzanine.core.middleware.SitePermissionMiddleware', 'mezzanine.pages.middleware.PageMiddleware') |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NEVERCACHE_KEY | '********************' |
NUMBER_GROUPING | 0 |
OPTIONAL_APPS | ('debug_toolbar', 'django_extensions', 'compressor', 'filebrowser_safe', 'grappelli_safe') |
PACKAGE_NAME_FILEBROWSER | 'filebrowser_safe' |
PACKAGE_NAME_GRAPPELLI | 'grappelli_safe' |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
PROJECT_APP | 'modbuilders' |
PROJECT_APP_PATH | '/rayflood/public/modbuilders/modbuilders' |
PROJECT_ROOT | '/rayflood/public/modbuilders' |
ROOT_URLCONF | 'modbuilders.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
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_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | True |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'modbuilders.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 1 |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/rayflood/public/modbuilders/static' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/rayflood/public/modbuilders/templates'], 'OPTIONS': {'builtins': ['mezzanine.template.loader_tags'], 'context_processors': ['django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.static', 'django.template.context_processors.media', 'django.template.context_processors.request', 'django.template.context_processors.tz', 'mezzanine.conf.context_processors.settings', 'mezzanine.pages.context_processors.page']}}] |
TESTING | False |
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 | 'Asia/Tokyo' |
USE_ETAGS | False |
USE_I18N | True |
USE_L10N | False |
USE_MODELTRANSLATION | False |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | None |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
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.