reverse proxy from the path to the desired address
I am going to reverse proxy domainone.com/blog/
to https://domaintwo.com
. The goal is to transform incoming requests as follows:
domainone.com/blog/ => https://domaintwo.com
domainone.com/blog/seo/ => https://domaintwo.com/seo/
domainone.com/blog/article/product/ => https://domaintwo.com/article/product/
But the settings I applied in config.yml are not working properly.
http:
routers:
novu_api_router:
rule: "Host(`domainone.com`) && Path(`/blog/`)"
service: "novu_api_service"
entryPoints:
- "https"
- "http"
tls:
options: default
certresolver: mycert
services:
novu_api_service:
loadBalancer:
servers:
- url: "https://domaintwo.com"
tls:
options:
default:
minVersion: VersionTLS12
maxVersion: VersionTLS13
cipherSuites:
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
- TLS_AES_256_GCM_SHA384
- TLS_CHACHA20_POLY1305_SHA256
certificates:
- certFile: /traefik/certs/fullchain.pem
keyFile: /traefik/certs/privkey.pem
Currently, the requests are incorrectly based on the config.yml above as follows:
domainone.com/blog/ => https://domaintwo.com/blog/
domainone.com/blog/seo/ => https://domaintwo.com/blog/seo/
domainone.com/blog/article/product/ => https://domaintwo.com/blog/article/product/
Please guide me. I have been searching on Google and asking questions from chatgpt for almost 4 days, but my problem is not solved.