Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caddy Version 2 Support on Ubuntu 22.04? #1569

Open
war59312 opened this issue Aug 7, 2023 · 2 comments
Open

Caddy Version 2 Support on Ubuntu 22.04? #1569

war59312 opened this issue Aug 7, 2023 · 2 comments

Comments

@war59312
Copy link

war59312 commented Aug 7, 2023

Hi,

Has anyone gotten Munin working with Caddy Version 2 on Ubuntu 22.04?

Be great if could get an example on https://guide.munin-monitoring.org/en/latest/example/index.html

munin.domain.com {
    root * /var/cache/munin/www
    file_server /*
}

That at least gets the basic pages working.

Have NOT gotten the CGI pages/images to work.

That is https://munin.domain.com/munin-cgi/

Best,

Will

@AndCycle
Copy link

AndCycle commented Jul 7, 2024

here is mine setting, my munin cgi spawn socks by spawn-fcgi

munin.example.com {

    ### !!! match munin.conf cgiurl_graph setting for path "/munin-cgi/munin-cgi-graph" !!! ###

    @cgiurl_graph expression {http.request.orig_uri.path.dir}.startsWith("/munin-cgi/munin-cgi-graph")

    handle_path /static/* {
        root * /etc/munin/static
        file_server
    }

    handle @cgiurl_graph {
        reverse_proxy  unix//run/munin-cgi-graph.sock {
            transport fastcgi {
                split /munin-cgi/munin-cgi-graph
            }
        }
    }

    handle {
        reverse_proxy  unix//run/munin-cgi-html.sock {
            transport fastcgi
        }
    }
}

@war59312
Copy link
Author

war59312 commented Jul 7, 2024

Thanks for sharing.

Sadly munin subdomain gives a HTTP ERROR 502 using that config.

If I comment out that last handle, most pages just show white page and view source is empty.

/static/dynazoom.html?cgiurl_graph page loads but still no images.

At the moment I am using:

munin.domain.com {
    root * /var/cache/munin/www
    file_server /*
    php_fastcgi 127.0.0.1:9000
    php_fastcgi /usr/lib/munin/cgi/munin-cgi-graph/ /var/run/munin/fcgi-graph.sock {
        split ^(/usr/lib/munin/cgi/munin-cgi-graph)(.*)
    }
    php_fastcgi /usr/lib/munin/cgi/munin-cgi-html/ /var/run/munin/fcgi-html.sock {
         split ^(/usr/lib/munin/cgi/munin-cgi-html)(.*)
    }
    handle /munin-cgi/* {
        root * /usr/lib/munin/cgi
        file_server /*
    }
    encode zstd gzip
}

munin.domain.com/munin-cgi {
    root * /usr/lib/munin
    file_server /*
}

Everything but the images on https://munin.domain.com/static/dynazoom.html work with above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants