-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add way to serve custom error pages via traefik middleware #305
Comments
There's currently no way to do that for all deployments (unless I'm missing something and traefik allows defining "default" middlewares). |
@yamalight ok it would be a cool feature i think, if you could set something in the exoframe config to set the labels automatically, when it is possible in any way. But for now... what do I have to do manually so that I can display my own error pages. Can you give me some instructions on this? |
Updated the ticket to reflect the feature! For now you can just add your middleware labels to {
// ... rest of your config
"labels": {
"traefik.http.middlewares.error-page.errors.status": "400-599",
"traefik.http.middlewares.error-page.errors.service": "error-page@docker"
"traefik.http.middlewares.error-page.errors.query": "{status}.html"
},
"middlewares": ["error-page@docker"],
} I think that should be enough 🤔 |
@yamalight ok thank you i have understood that so far. 👍 Sorry for the question I am not quite familiar with docker and traefik yet, but do I have to create a own docker-compose file only for my error-page container or how can i define this container/service globally in docker or can i also use exoframe do deploy such a service? |
I'd simply create a new exoframe deployment for that apache with one additional label ( |
On my debian server i am using exoframe and traefik. I have services that i deployed with exoframe and there are some apps like directus or gitlab that i added manually. So far so good. Everything works fine. But if a service is not available, only the following text is displayed in the browser:
of course it doesn't look that professional... so I would like to display my own error pages, if
I read in the traefik documentation that you need an own service for the error pages. So I found this example:
How can I apply the example shown above to my exoframe environment? Do i have to specify a separate service in each docker-compose file that displays the error pages, or can i define one globally? if so, how? Where do I have to specify which labels so that Traefik displays the error pages even if the desired service is not available?
What if the whole server is not available. Can I still display my own error pages even in this case? Can Traefik then address a backend server, which then displays the error pages? What do I have to configure here to make this work?
The text was updated successfully, but these errors were encountered: