Serving files [cs, html, css] from minio server

I’m having a public MinIO server [all files are publicly available] and trying to serve my website from it but I can’t find a solution
# Serve static pages from minio through caddy · GitHub this is for html pages only and the syntax doesn’t work anyway with caddy 2

Any ideas how can I achieve this?

Regards,

Please fill out the help topic template, as per our forum rules.

1 Like

This is what I’m having right now

:8300 {
        route /* {
                reverse_proxy http://bucket.local:9000
        }
}

My question is … can I serve on / the website from bucket.local/website ?

Caddy doesn’t know that I’m having there an index.html file to serve it, and the solution from the above URL is not working and I’m having js and css files as well there

I don’t understand the question.

Like I said, please fill out the help topic template. Click on “New Topic”, then copy the template filled in the text box, fill it out and post it as a new comment in this topic.

1. Caddy version (caddy version):

v2.4.3 h1:Y1FaV2N4WO3rBqxSYA8UZsZTQdN+PwcoOcAiZTM8C0I=

2. How I run Caddy:

./caddy run --config myConfigFile [inside a container]

a. System environment:

Docker

d. My complete Caddyfile or JSON config:

:8300 {
        route /* {
                reverse_proxy http://bucket.local:9000
        }
}

3. The problem I’m having:

To be able to access my website I’ll need to:

  • localhost:8300/bucketname/website

What I want to be able to do is serving /bucketname/website right on the root domain /

  • like: localhost:8300

That’s an old version. Please upgrade to v2.5.1

You don’t need the route here, it doesn’t do anything for you. You can simplify it to this:

:8300 {
	reverse_proxy bucket.local:9000
}

Then what you want is to rewrite while adding a prefix, it sounds like.

Try this:

:8300 {
	rewrite * /bucketname/website{uri}
	reverse_proxy bucket.local:9000
}
3 Likes

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