Nginx HTTP not redirecting to HTTPS 400 Bad Request “The plain HTTP request was sent to HTTPS port”
问题 I'm running nginx in docker. HTTPS works fine but when I explicitly make HTTP request I get the following error 400 Bad Request The plain HTTP request was sent to HTTPS port nginx.conf is as follows worker_processes auto ; events {} http { include /etc/nginx/mime.types; access_log /var/log/nginx/main.access.log; server { listen 80; location / { return 301 https://localhost:3000$request_uri; } } server { listen 443 ssl; server_name localhost:3000; root /var/www/html; ssl_certificate /etc/nginx