From: Dirk-Willem van Gulik <dirkx@webweaving.org> To: Dianne Skoll <dianne@skoll.ca> Subject: [Galene] Re: Behind reverse proxy, not at the root Date: Sun, 3 Mar 2024 17:04:14 +0100 [thread overview] Message-ID: <7940BE01-0345-41E5-BAAD-C11A9E579690@webweaving.org> (raw) In-Reply-To: <170947981403.1000.17286547855683116289@gauss.local> On 3 Mar 2024, at 16:30, Dianne Skoll via Galene <galene@lists.galene.org> wrote: > On Sun, 03 Mar 2024 16:20:36 +0100 Juliusz Chroboczek <jch@irif.fr> wrote: > >> The obvious solution would be to make these pages dynamically >> generated, but that in turn would make it difficult for people to >> customise them as they wish. Since I think that allowing easy >> customisation is more important than making Galene easy to use with >> reverse proxies, I haven't done that. ... > href="%WEBROOT%/whatever/the/link/is” Alternatively - given that, if one drops the leading ‘/‘ on src/href all these links end up being, I think, of the style https://galene.domain.com/PREFIX/group/<foo>/…. Such as for the group “Ww": https://galene.domain.com/PREFIX/group/Ww/galene.js https://galene.domain.com/PREFIX/group/Ww/external/fontawesome/css/regular.min.css Mapped in general from https://galene.domain.com/PREFIX(.*) to http://127.0.0.1:8888/$1; Where 127.0.0.1:8888 is what is the ' -http 127.0.0.1:8888 ‘ arg of Galene says. So we just strip ‘PREFIX’ here. With only a few exemptions from that rule for: https://galene.domain.com/PREFIX/ws (websocket only) https://galene.domain.com/PREFIX/group/Ww/ (as is) https://galene.domain.com/PREFIX/group/Ww/.status.json That need to be mapped routed to their original places. This works well enough for me against Freebsd-ports and an apache/nginx (TLS stripping, reverse proxy) to Jail (galena, http) setting. And with below ‘just strip out the /‘ approach. I think it only breaks in one place — at the 404 not found that wants to send you to the root. That may be an easy thing to add to galene perhaps. With kind regards, Dw. diff -r galene.old/404.html galene/404.html 7,8c7,8 < <link rel="stylesheet" href="/common.css"> < <link rel="stylesheet" type="text/css" href="/404.css"/> --- > <link rel="stylesheet" href="common.css"> > <link rel="stylesheet" type="text/css" href="404.css"/> 10,12c10,12 < <link rel="stylesheet" type="text/css" href="/external/fontawesome/css/fontawesome.min.css"/> < <link rel="stylesheet" type="text/css" href="/external/fontawesome/css/solid.min.css"/> < <link rel="stylesheet" type="text/css" href="/external/fontawesome/css/regular.min.css"/> --- > <link rel="stylesheet" type="text/css" href="external/fontawesome/css/fontawesome.min.css"/> > <link rel="stylesheet" type="text/css" href="external/fontawesome/css/solid.min.css"/> > <link rel="stylesheet" type="text/css" href="external/fontawesome/css/regular.min.css"/> 25c25 < <a href="/" class="home-link">Back to home</a> --- > <!-- a href="/" class="home-link">Back to home</a --> diff -r galene.old/galene.html galene/galene.html 8,9c8,9 < <link rel="stylesheet" type="text/css" href="/common.css"/> < <link rel="stylesheet" type="text/css" href="/galene.css"/> --- > <link rel="stylesheet" type="text/css" href="common.css"/> > <link rel="stylesheet" type="text/css" href="galene.css"/> 11,15c11,15 < <link rel="stylesheet" type="text/css" href="/external/fontawesome/css/fontawesome.min.css"/> < <link rel="stylesheet" type="text/css" href="/external/fontawesome/css/solid.min.css"/> < <link rel="stylesheet" type="text/css" href="/external/fontawesome/css/regular.min.css"/> < <link rel="stylesheet" type="text/css" href="/external/toastify/toastify.css"/> < <link rel="stylesheet" type="text/css" href="/external/contextual/contextual.css"/> --- > <link rel="stylesheet" type="text/css" href="external/fontawesome/css/fontawesome.min.css"/> > <link rel="stylesheet" type="text/css" href="external/fontawesome/css/solid.min.css"/> > <link rel="stylesheet" type="text/css" href="external/fontawesome/css/regular.min.css"/> > <link rel="stylesheet" type="text/css" href="external/toastify/toastify.css"/> > <link rel="stylesheet" type="text/css" href="external/contextual/contextual.css"/> 299,302c299,302 < <script src="/protocol.js" defer></script> < <script src="/external/toastify/toastify.js" defer></script> < <script src="/external/contextual/contextual.js" defer></script> < <script src="/galene.js" defer></script> --- > <script src="protocol.js" defer></script> > <script src="external/toastify/toastify.js" defer></script> > <script src="external/contextual/contextual.js" defer></script> > <script src="galene.js" defer></script> diff -r galene.old/index.html galene/index.html 7,9c7,9 < <link rel="stylesheet" href="/common.css"> < <link rel="stylesheet" href="/mainpage.css"> < <link rel="stylesheet" type="text/css" href="/galene.css"/> --- > <link rel="stylesheet" href="common.css"> > <link rel="stylesheet" href="mainpage.css"> > <link rel="stylesheet" type="text/css" href="galene.css"/> 36c36 < <script src="/mainpage.js" defer></script> --- > <script src="mainpage.js" defer></script> diff -r galene.old/stats.html galene/stats.html 7c7 < <link rel="stylesheet" href="/common.css"> --- > <link rel="stylesheet" href="common.css"> 15c15 < <script src="/stats.js" defer></script> --- > <script src="stats.js" defer></script>
prev parent reply other threads:[~2024-03-03 16:07 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-17 23:40 [Galene] " Francis Bolduc 2024-01-18 11:08 ` [Galene] " Juliusz Chroboczek 2024-01-18 14:56 ` Francis Bolduc 2024-02-24 11:49 ` Juliusz Chroboczek 2024-02-24 14:34 ` Francis Bolduc 2024-02-24 18:27 ` Francis Bolduc 2024-02-24 18:44 ` Juliusz Chroboczek 2024-02-24 18:56 ` Francis Bolduc 2024-02-24 20:12 ` Juliusz Chroboczek 2024-02-24 21:28 ` Francis Bolduc 2024-02-24 22:16 ` Juliusz Chroboczek 2024-02-24 22:19 ` Francis Bolduc 2024-02-24 22:49 ` Juliusz Chroboczek 2024-02-25 0:51 ` Francis Bolduc 2024-02-25 11:10 ` Juliusz Chroboczek 2024-03-03 15:20 ` Juliusz Chroboczek 2024-03-03 15:30 ` Dianne Skoll [not found] ` <170947981403.1000.17286547855683116289@gauss.local> 2024-03-03 15:52 ` Juliusz Chroboczek 2024-03-03 16:04 ` Dirk-Willem van Gulik [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: https://lists.galene.org/postorius/lists/galene.lists.galene.org/ * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=7940BE01-0345-41E5-BAAD-C11A9E579690@webweaving.org \ --to=dirkx@webweaving.org \ --cc=dianne@skoll.ca \ --subject='[Galene] Re: Behind reverse proxy, not at the root' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox