etherpad-lite
etherpad-lite copied to clipboard
Can't retrive admin panel behind Nginx reverse proxy under subdirectory (possible upstream experimental)
Describe the bug
Set up an instance behind Nginx reverse proxy under the subdirectory with methods from wiki. The main project works fine, but the admin panel failed to load.
Upon further investigation, found that the assets are loaded relative to the webroot(<host>/admin/assets/...
), but not to the subdirectory, which results in a failed rewrite catch for nginx.
Checking for code, admin
seems like a separate Vite project. Its build option base
specified absolute one level to root, which would not work aforementioned. Other options are not available either, ./
would just result in resolving to webroot without admin
level, ./admin
is not supported. Seems like an experimental method described in Vite project document would work but with tweaking.
Recommendation:
- Make a fix to the path problem using the provided feature (experimental);
- Should be the best to do, still using the current method to treat subdirectory build, but still experimental;
- Provide a configuration to declare the use of subdirectory, rewriting the base path on the fly, for the admin panel only (Just adding a workaround instruction calling people to manually write would be helpful);
- Quickest to do but not really recommended, more quirk to do between the main project and the admin panel;
- Other possible fixes?
To Reproduce Steps to reproduce the behavior:
- Manual install and start the instance as described in README;
- Configure reverse proxy with the provided config in the wiki;
- Open the admin panel.
Expected behavior Admin panel should load.
Screenshots
Server (please complete the following information):
- Etherpad version: v2.0.3
- OS: CentOS 9 Stream
- Node.js version (
node --version
): v18.19.1 - npm version (
npm --version
): 10.2.0 - Is the server free of plugins: It's free of plugins.
Desktop (please complete the following information): Not relevant but here you go:
- OS: Fedora
- Browser [e.g. chrome, safari]: Mozilla Firefox
- Version [e.g. 22]: 125.0.3
Smartphone (please complete the following information): Not relevant.
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.