Unable to get caddy to work

Hi Francis,
thanks for your reply, I have tweaked the Caddyfile after your suggestion and it works now, partially…
I could access my rss.####.duckdns.org:4443 now, which is my ttrss server, and also the main site ####.duckdns.org:4443.
However, the site “rss.####.duckdns.org:4443” does not load correctly. It takes a minute to get the login page and looks really weird.

Although there are some other content types in the curl output, (like “text/css” and “text/javascript”), the headers only allow “text/html”.
I dont know if thats the problem but in the console of the developer mode in Firefox, it said “script loading error”

Loading failed for the with source “https://rss.####.duckdns.org:4443/lib/dojo/dojo.js?1668217531”

I have also browsed the forum, tunrs out you have also anwsered another thread about fail loading css etc.

Caddy not loading CSS because of MIME type - #2 by francislavoie

However, I tried to ass Content-type headers, But they did not work, well no changes were in curl’s output.

anyway, here is my recent Caddyfile

****.duckdns.org:4443 {
        tls {
                dns duckdns {token}
        }

        root * /var/www/html
        file_server

        encode zstd gzip

        handle_errors {
                rewrite * /{err.status_code}.html
        }
}

rss.****.duckdns.org:4443 {
        tls {
                dns duckdns {token}
        }

        root * /var/www/html
        file_server

        reverse_proxy 127.0.0.1:181
        encode zstd gzip

#        @css path *.css
#        @java path *.js


        header {
                  Content-Type text/css
                  Content-Type application/javascript
        }

        handle_errors {
                rewrite * /{err.status_code}.html
        }
}

well later I managed to add a content header correctly, but the page was still broken, so it might not be the MIME problem