Welcome! Log In Create A New Profile

Advanced

nginx http Error "400 Bad Request"

Posted by achalk 
nginx http Error "400 Bad Request"
May 26, 2023 12:25PM
I get this error when I attempt to access my site at: http://exhibit.technology

**The Webconfs header check tool shows the following.

HTTP/1.1 400 Bad Request =>
Server => nginx/1.14.0 (Ubuntu)
Date => Sun, 23 Apr 2023 20:24:50 GMT
Content-Type => text/html
Connection => close
X-Content-Type-Options => nosniff
Referrer-Policy => same-origin**
The IP address of the above URL is 192.81.211.160. When I enter it directly it works. My site loads. http://192.81.211.160

The Webconfs header check tool shows:

HTTP/1.1 200 OK =>
Server => nginx/1.14.0 (Ubuntu)
Date => Sun, 23 Apr 2023 20:23:35 GMT
Content-Type => text/html; charset=utf-8
Content-Length => 6857
Connection => close
X-Frame-Options => DENY
Vary => Cookie
X-Content-Type-Options => nosniff
Referrer-Policy => same-origin
The nginx error log (the lines around the report of the HTTP 400 error) is shown below (I can provide more if needed).

I do not see why the IP address access works but the name access does not. Also, I do not know how to infer the problem from the log. Any help appreciated.

The DNS and hosting is on Digital Ocean. The app. is written in Django and has Debug=False and ALLOWED_HOSTS populated in settings.py

nginx log:

023/04/23 20:42:39 [debug] 13352#13352: *2 http upstream dummy handler
2023/04/23 20:42:39 [debug] 13352#13352: *2 http upstream request: "/?"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http upstream dummy handler
2023/04/23 20:42:39 [debug] 13352#13352: *2 http upstream request: "/?"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http upstream process header
2023/04/23 20:42:39 [debug] 13352#13352: *2 malloc: 000056424E53BD20:4096
2023/04/23 20:42:39 [debug] 13352#13352: *2 recv: eof:0, avail:1
2023/04/23 20:42:39 [debug] 13352#13352: *2 recv: fd:12 190 of 4096
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy status 400 "400 Bad Request"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header: "Server: gunicorn"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header: "Date: Sun, 23 Apr 2023 20:42:39 GMT"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header: "Connection: close"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header: "Content-Type: text/html"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header: "X-Content-Type-Options: nosniff"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header: "Referrer-Policy: same-origin"
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy header done
2023/04/23 20:42:39 [debug] 13352#13352: *2 xslt filter header
2023/04/23 20:42:39 [debug] 13352#13352: *2 HTTP/1.1 400 Bad Request
Server: nginx/1.14.0 (Ubuntu)
Date: Sun, 23 Apr 2023 20:42:39 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin

2023/04/23 20:42:39 [debug] 13352#13352: *2 write new buf t:1 f:0 000056424E567A58, pos 000056424E567A58, size: 236 file: 0, size: 0
2023/04/23 20:42:39 [debug] 13352#13352: *2 http write filter: l:0 f:0 s:236
2023/04/23 20:42:39 [debug] 13352#13352: *2 http cacheable: 0
2023/04/23 20:42:39 [debug] 13352#13352: *2 posix_memalign: 000056424E53CD30:4096 @16
2023/04/23 20:42:39 [debug] 13352#13352: *2 http proxy filter init s:400 h:0 c:0 l:-1
2023/04/23 20:42:39 [debug] 13352#13352: *2 http upstream process upstream
2023/04/23 20:42:39 [debug] 13352#13352: *2 pipe read upstream: 0
2023/04/23 20:42:39 [debug] 13352#13352: *2 pipe preread: 0
202
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 190
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready