I'm trying to test a setup in Docker. A web server running a python application, and I want to add an Nginx service to serve it. The result I am getting is "400 bad request" error
In the Nginx container I do these tests with curl and wget, and these are the results: WGET
root@b301fc0bb378:/# wget http://web_python:8000
--2022-12-05 19:01:06-- http://web_python:8000/
Resolving web_python (web_python)... 172.23.0.3
Connecting to web_python (web_python)|172.23.0.3|:8000... connected.
HTTP request sent, awaiting response... 400 Bad Request
2022-12-05 19:01:06 ERROR 400: Bad Request.`
CURL
root@b301fc0bb378:/# curl http://web_python:8000
<!doctype html>
<html lang="en">
<head>
<title>Bad Request (400)</title>
</head>
<body>
<h1>Bad Request (400)</h1><p></p>
</body>
</html>
The Python container responds this: `
[05/Dec/2022 13:34:58] You're accessing the development server over HTTPS, but it only supports HTTP.
This is my nginx.conf: `
upstream web_python {
server web_python:8000;
}
server {
listen 80;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_redirect off;
proxy_pass http://web_python;
}
}
`
I do not understand why the requests are confused, if my configurations are in http, it is the development phase. Thank you...