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

404 handler code #2184

Closed
kfox1111 opened this issue Mar 7, 2018 · 7 comments
Closed

404 handler code #2184

kfox1111 opened this issue Mar 7, 2018 · 7 comments

Comments

@kfox1111
Copy link

kfox1111 commented Mar 7, 2018

currently the 404 handler does just that. only serve out 404 messages (file not found). This is probably the appropriate message to return when a vhost does not exist.

On the other hand, if all of a services members are completely down, 404 is probably not the right answer, as its not that the files are missing so stop trying, but that 503 the server is currently unavailable. keep trying.

Can the 404 handler have a configuration flag added to it to configure which error code to return, so 2 of them can be launched, one for 404 and one for 503?

@aledbf
Copy link
Member

aledbf commented Mar 16, 2018

@kfox1111 if there are no endpoints available you should see 503, not 404
Please check

{{/* if we are sending the request to a custom default backend, we add the required headers */}}

If you use a custom backend you receive the status code and you can customize the action

@kfox1111
Copy link
Author

kfox1111 commented Apr 3, 2018

Thanks for the info.

I'm trying to implement this, but getting stuck. Where is the image for this?

docker pull quay.io/kubernetes-ingress-controller/custom-error-pages
Trying to pull repository quay.io/kubernetes-ingress-controller/custom-error-pages ... 
Pulling repository quay.io/kubernetes-ingress-controller/custom-error-pages
Error: Status 403 trying to pull repository kubernetes-ingress-controller/custom-error-pages: "{\"error\": \"Permission Denied\"}"

If I understand right, each ingress object needs an nginx.ingress.kubernetes.io/default-backend set to the custom handler?

@aledbf
Copy link
Member

aledbf commented Apr 3, 2018

@kfox1111
Copy link
Author

kfox1111 commented Apr 3, 2018

So, do we need to build our own images?

@aledbf
Copy link
Member

aledbf commented Apr 3, 2018

@kfox1111
Copy link
Author

kfox1111 commented Apr 3, 2018

Ah. perfect. thanks.

@aledbf
Copy link
Member

aledbf commented Apr 8, 2018

Closing. Please reopen if you have more questions

@aledbf aledbf closed this as completed Apr 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants