Question about Caddy Server capabilities

I am new to CaddyServer.

I have been asked to implement a simple reverse proxy in AWS Ec2 Ubuntu VM.
Client requests will come to AWS ALB. SSL is terminated in ALB
It will do path based routing and forward request to ubuntu server running caddy server.

I want caddy server to be able to map incoming url to new external site.
so I will need to map to a new site and also update part of the path as some below.

for example:
Incoming request:
should be mapped to

In above example I changed to
I also changed es-mx to en-us
should be mapped to

I want to set this up manually first.
Once it is setup I want to automate the process of adding rules to the Caddyfile.

Before I spend time looking into documentation I was hoping somebody can tell me if this can be implemented with Caddy.


Hi @Rajinder_Singh, Caddy can definitely handle this.

You’ll need to make use of the rewrite and proxy directives. Use a regex to rewrite /es-mx/ to /en-us/, and a standard proxy (transparent preset might be useful?) to forward the traffic to the second site.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.