How to add a index.html outside of reverse_proxy

Hi. Welcome! :slight_smile:

1. The problem I’m having:

I am not able to add rewrite or exclude to have a index.html page out of reverse_proxy. All requests other than index.html should be forwarded to reverse proxy

2. Error messages and/or full log output:

Doesnt know the caddyfile format to achieve this, so cant get it working. No error logs

3. Caddy version:

v2.7.3

4. How I installed and ran Caddy:

Its a debian server
apt install caddy

a. System environment:

Debian

b. Command:

NA

c. Service/unit/compose file:

NA

d. My complete Caddy config:

*.example.com { 
                    tls /etc/letsencrypt/live/example.com/fullchain.pem /etc/letsencrypt/live/example.com/privkey.pem 
                   log { 
                         hostnames 1.example.com 
                         output file /var/log/caddy/1.example.com.log 
                         } 
                 @1 host 1.example.com 
                 handle @1 { reverse_proxy localhost:007 }
                        }

Any update would be helpfull

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