#4982 (How to avoid "Invalid HTTP_HOST header")
by Luc Saffre · in Hosting (system administration) · assigned to Luc Saffre
Kokkuvõte
The new production server is sending lots of emails to ADMINS saying [avanti] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: '12.123.234.56'. You may need to add '12.123.234.56' to ALLOWED_HOSTS.
Children
Kommentaarid
- 7 kuud, 2 nädalat ago by Luc Saffre about #4982 (How to avoid "Invalid HTTP_HOST header") : We applied @8lurry 's approach on nora. Everything seems to work. We'll see soon whether the issue is gone. I can't really test it because I don't know how to make a get to an IPv6 address...
- 7 kuud, 2 nädalat ago by Luc Saffre about #4982 (How to avoid "Invalid HTTP_HOST header") : I'm still getting this error about once per day for (immo1 on nora). So we should try Sharif's approach there.
- 8 kuud ago by Luc Saffre in reply to Sharif Mehedi about #4982 (How to avoid "Invalid HTTP_HOST header") : Oho, I didn't yet know this approach, which has the advantage of being easier than what we were doing until now. I noted this in the hosting guide.
- 8 kuud ago by Luc Saffre in reply to Luc Saffre about #4982 (How to avoid "Invalid HTTP_HOST header") : It's not sure whether this was the solution. Maybe it is because the request asked for the IPv6 address (2001:41d0:701:1100::124f). To be observed.
- 8 kuud ago by Luc Saffre in reply to Luc Saffre about #4982 (How to avoid "Invalid HTTP_HOST header") (1 reply) : The default conf wasn't active because the file had no .conf suffix. I renamed it to default.conf now.
- 8 kuud ago by Luc Saffre about #4982 (How to avoid "Invalid HTTP_HOST header") (1 reply) : I got this once today for immo1 (which is on nora).
- 8 kuud ago by Sharif Mehedi about #4982 (How to avoid "Invalid HTTP_HOST header") (1 reply) : Recently I put a conf on nginx that return 444 if the server_name is not matched by any of the hosted server. It look like: In the file /etc/nginx/conf.d/00-block-ip.conf: server { listen 80 default_server; listen [::]:80 default_server;
server_name _;
return 444; }
server { li... - 1 aasta, 10 kuud ago by Luc Saffre about #4982 (How to avoid "Invalid HTTP_HOST header") (1 reply) : It now happens on laudate after my recent changes for fixing the www problem.