Skip to content
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

Custom error_page redirects not working #11323

Closed
ukp9 opened this issue Apr 29, 2024 · 3 comments
Closed

Custom error_page redirects not working #11323

ukp9 opened this issue Apr 29, 2024 · 3 comments
Labels
needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@ukp9
Copy link

ukp9 commented Apr 29, 2024

NGINX Ingress controller version: 1.10.0

👍 kubectl version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.7-eks-b9c9ed7

Environment :

GKE , EKS , AKS
OS : Alpine Linux
What happened:

I wanted to have custom error_page for specific error code . However , when error_page defined in server-snippet it doesn't work .
I tried both with proxy_intercept_errors on and without proxy_intercept_errors . It doesn't redirect .

server-snippet: | proxy_intercept_errors on error_page 302 /etc/nginx/error_files/302.html; location = /etc/nginx/error_files/302.html { internal; } }

What you expected to happen:
302 redirect to work

How to reproduce it (as minimally and precisely as possible):
Create a simple ingress with the above server-snippet in the configmap and attempt to reach a page that doesn't exist.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Apr 29, 2024
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If Ingress contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority labels Apr 29, 2024
@longwuyuan
Copy link
Contributor

Please try this https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/

If it does not work as documented, kindly re-open the issue and provide details. If you re-open the issue, kindly look at the template of a new bug report and edit this issue's description to provide answers to the questions asked in that template. KIndly us md format to answer the questions, as templated. That information is required for readers to understand the complete use-case and the work so far on the issue. This way reproducing the problem or understanding the details of the problem become possible.

Thanks

/close

@k8s-ci-robot
Copy link
Contributor

@longwuyuan: Closing this issue.

In response to this:

Please try this https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/

If it does not work as documented, kindly re-open the issue and provide details. If you re-open the issue, kindly look at the template of a new bug report and edit this issue's description to provide answers to the questions asked in that template. KIndly us md format to answer the questions, as templated. That information is required for readers to understand the complete use-case and the work so far on the issue. This way reproducing the problem or understanding the details of the problem become possible.

Thanks

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
Development

No branches or pull requests

3 participants