We are using GKE and have deployed nginx-ingress as the IngressController. While accessing the IP of the LoadBalancer on port 443, nginx is returning back the below page.
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>
I tried using custom-http-errors in the ConfigMap and have added the --default-backend-service flag in the Deployment YAML file of nginx-ingress-controller.
I am trying to achieve either of the below things:
nginx coming in the page.Closing. Please use the issue template if you open a new issue
@swvaibhav this error means you mapped the http port of the ingress controller to the port 443 of your ingress-nginx service.
@aledbf I have not set up any service for the IP based route. When I am simply accessing the public IP of the Ingress Controller Service which is of type LoadBalancer, it is showing me this page. This is what has come in our recent vulnerability scans as the returned page shows the name of the server i.e nginx.
Is there any way to remove the server name or simply change the page which is being returned?
@aledbf Any help on this would be really great.