hello, i have just started using Traefik, and hit a 503 issue.
i have for example a url:
this-is-my.url.co.uk
Set up on AWS Route53, which has a virtual host, so to get to the application the full url is
this-is-my.url.co.uk :{port}/{VirtualHostDir}
However going through Traefik, i get a 503
With your post we are navigating absolutely in the dark
Share your Traefik static and dynamic config, and docker-compose.yml
if used.
Check your Traefik debug log and dashboard .
See simple Traefik example .
@bluepuma77
sorry about that
heres the static:
entryPoints:
web:
address: :80
web-secure:
address: :443
providers:
file:
filename: /etc/traefik/all.yaml
watch: true
api:
dashboard: true
insecure: true
log:
level: DEBUG
filepath: "/etc/traefik/traefik.log"
And the dynamic:
http:
routers:
leavePlusRouter:
service: leavePlus
entryPoints:
- "web"
rule: Host(`this-is-my.url.co.uk`)
services:
leavePlus:
loadBalancer:
servers:
# - url 'http://3.8.7.230'
- url 'this-is-my.url.co.uk'
And my basic docker file
version: "3.3"
services:
# Required default service
traefik:
image: "traefik:v2.10"
container_name: "traefik-proxy-server"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
ports:
- "80:80"
- "8080:8080"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "/etc/traefik:/etc/traefik"
Use 3 backticks in front and after the code to format it, or select the code and press the </>
button. In YAML every space matters.
@bluepuma77
ah thank you for that, i have reformatted
basically want i would like to do is have the url redirect to the path needed, but keep the url clean as the entry url
so
http://this-is-my.url.co.uk -> this-is-my.url.co.uk :{port}/{app-v-path}
and stays in the browser as the initial URL
Is this possible?
I think what you want is not a redirect. A redirect tells the browser to go to a different URL. You want Traefik to proxy your request to a different address, transparent to your browser, without changing the URL in the browser, right?
This might introduce a challenge, because your app might respond with inline paths (redirect, image and script links) that may be absolute and not match with the URL the browser loads.
This seems invalid, see doc :
Note that you create a http interface on 443 without loading a cert or using LetsEncrypt. See simple Traefik example .
Also note: your log does not match the configuration you posted.
bluepuma77:
I think what you want is not a redirect. A redirect tells the browser to go to a different URL. You want Traefik to proxy your request to a different address, transparent to your browser, without changing the URL in the browser, right?
that is correct.
re log: i changed the url in the config yml files to match up with my OP but missed the log file.
How does one go about setting up the proxy request? i have gone through the documentation and not quite sure what/how to do it
You are proxing. Maybe you are just missing a ":" after "url":
## Dynamic configuration
http:
services:
my-service:
loadBalancer:
servers:
- url: "http://private-ip-server-1/"
@bluepuma77
hahaha, thank you very much!!
that is now working (changed my proxy address to hit google), using my own address has an issue still.
now getting gateway timeout, so i think this is now outside of Traefik config.
Thank you very much for your help
system
Closed
July 22, 2023, 11:18am
11
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.