Forward proxy listening on two ports

1. The problem I’m having:

Sorry for newbie question
I tried to set-up the caddy forward proxy listening on two ports (1234 and 1235). Adding the forward package did work.

I want to achieve that if the proxy is called on one port the proxy should forward the request.
Accessing the proxy on the other port the proxy should not permit the access and maybe also return a custom html.

2. Error messages and/or full log output:

To test the scenario i configured windows proxy config to use either port 1234 or port 1235.
But when i type in an url in the webbrowser the custom html never shows up.
Also tried to setup the second port with "respond “no access” 403. But the respond is not shown.

3. Caddy version:

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:

a. System environment:

Caddy is running in a virtual machine with Ubuntu 20.04 where the ip of the machine is

b. Command:

caddy add-package

above did install successfully

d. My complete Caddy config: {
log {
output stdout

    route {
            forward_proxy {
                    basic_auth user2 asdf

} {
log {
output stdout
file_server {
root /var/www/html/custom.html

5. Links to relevant resources:

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