Reverse proxy to host folder

1. Caddy version:

Caddy 2
Current version: 1.4.0

2. How I installed, and run Caddy:

Caddy on Home Assistant

a. System environment:

Home assistant

b. Command:

Paste command here.

c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddy config: {

    rewrite * /savapp/index.html


3. The problem I’m having: {

rewrite * /savapp/index.html


The page is loaded without image and css

4. Error messages and/or full log output:

{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":""}},"duration":0.000488895,"status":502,"err_id":"4f2e95cx8","err_trace":"reverseproxy.statusError (reverseproxy.go:1281)"}

5. What I already tried: {

but didn’t.t work, the browser show empty page {

rewrite * /savapp/index.html

with this I can see the page but missing css and images in /savapp folder

6. Links to relevant resources:

You must completely fill out the help topic template, as per the forum rules. We can’t help you otherwise.

1 Like

I changed in: {

    rewrite * /savapp/index.html


and now I see index.html

i have to fix css folder called assets and image folder.

Can you help me?

This will rewrite every request to that URL, so whatever you request, only the index will be returned.

Again, you haven’t provided enough information or context to your setup for us to help. You MUST completely fill out the help topic template, as per the forum rules. Be as detailed as possible.

i edited the original first post for 2 time. It’s good now?

this doesn’t work as well: {

    root * /savapp


the page loaded is that in the host

who can help me?

I solved my problem creating a vHost on apache and assign to the host a different port.
Thank you everyone.

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