-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid redirect port from http to https #1743
Comments
@cristic83 this works as expected. You are reaching the default server and by default it redirects to ssl. |
Well, it redirects to SSL, which is ok, but it redirects on the wrong port: it should redirect on the ssl port, not on the normal one. E.g: if I make a request to http://mydomain:8080/health, it should redirect to https://mydomain:8843/health, provided that I configured the http port to be 8080 and the https port to be 8843. |
@cristic83 please enable |
Can you please provide an example? The following settings for the args did not work: args: The pods don't start. The logs say: unknown flag: --use-port-in-redirects Thanks, |
The same result (unknown flag: --nginx-configmap) using a config map like below: [ec2-user@ip-10-0-110-21 ~]$ oc get configmap nginx-controller-conf -o yaml [ec2-user@ip-10-0-110-21 ~]$ oc get daemonset nginx-ingress-lb -o yaml [ec2-user@ip-10-0-110-21 ~]$ oc get daemonset nginx-ingress-lb [ec2-user@ip-10-0-110-21 ~]$ oc logs nginx-ingress-lb-hn8jz I've used the flag --nginx-configmap as described in here: https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/custom-configuration/rc-custom-configuration.yaml |
@cristic83 the flag name is --configmap. |
Thanks, for your suggestion, but it still does not work: [ec2-user@ip-10-0-110-21 ~]$ oc get daemonset nginx-ingress-lb -o yaml [ec2-user@ip-10-0-110-21 ~]$ oc get configmap nginx-controller-conf -o yaml [ec2-user@ip-10-0-110-21 ~]$ curl -v mydomain:8080/health
< HTTP/1.1 301 Moved Permanently
[ec2-user@ip-10-0-110-21 ~]$ oc get ingress my-ingress |
@cristic83 please use |
This problem still exists in the latest 0.32 version |
NGINX Ingress controller version:
gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.15
Kubernetes version (use
kubectl version
):oc v3.6.1+008f2d5
kubernetes v1.6.1+5115d708d7
Environment:
NAME="Red Hat Enterprise Linux Server"
VERSION="7.2 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.2"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.2 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.2:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.2
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.2"
Kernel (e.g.
uname -a
):Linux ip-10-0-110-21.eu-west-1.compute.internal 3.10.0-327.el7.x86_64 Basic structure #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
Install tools:
OpneShift
Others:
What happened:
When configuring the nginx-controller with custom http and https ports and calling http://:${NGINX_HOST_HTTP_PORT}/health we got a redirect to https://:${NGINX_HOST_HTTP_PORT}/health instead of http://:${NGINX_HOST_HTTPS_PORT}/health
What you expected to happen:
The redirect should be performed to the https port, not to the http port.
How to reproduce it (as minimally and precisely as possible):
Launch an nginx-controller with the following args:
Anything else we need to know:
The text was updated successfully, but these errors were encountered: