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
Can't retrive admin panel behind Nginx reverse proxy under subdirectory (possible upstream experimental) #6369
Comments
Oh that is a regression. Thanks for the report. I'll try to find a solution. Maybe something with JS that replaces the url with window.href at runtime but that is something I need to check first. |
I'll add myself to this one: I'm running EP on Uberspace even behind a nginx proxy which adds
to nginx.conf. Admin panel was working well with 1.9.7 but it fails with 2.x What can be done here? |
@Uatschitchun The nginx config has been updated too, see Wiki. Please try modifying your nginx config. |
@EL-File4138 It's sadly not possible to setup own nginx.conf on uberspace ;( Don't know if this helps, but calling domain.de/pad/admin/login gives this in access.log:
While opening domain.de/pad/admin-auth gives this:
Result: /pad/socket.io/ is also working:
Result: So is there any re-writing going on regarding |
@Uatschitchun This fix utilizes an HTTP Header |
@EL-File4138
So if I get your fix correct, the paths should be created dynamically from adding x-proxy-path to /admin & /socket.io Did the following:
URL/pad => works (worked also before setting
access.log states:
URL is correct: After running
With 2.0.3 (prior to the fix) the missing Admin UI is just noted as:
and EP does not crash! access.log gives:
which are the correct paths! |
@Uatschitchun
If the problem persists, I recommend you first test under the given environment (A fully controlled nginx and webroot), then match your configuration with the given config. |
If it might help I have my configuration posted over here: #6402 |
Ok, so the X-Proxy-Path header isn't correctly received here. Have to check further. It works when "hardcoding" the subfolder path:
@EL-File4138 & @SamTV12345 and the ADMIN_PATH check in P.S.: Wouldn't it be easier to just add a setting in settings.json instead of adding the header in nginx.conf and rewriting URLs accordingly?! |
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 optionbase
specified absolute one level to root, which would not work aforementioned. Other options are not available either,./
would just result in resolving to webroot withoutadmin
level,./admin
is not supported. Seems like an experimental method described in Vite project document would work but with tweaking.Recommendation:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Admin panel should load.
Screenshots
Server (please complete the following information):
node --version
): v18.19.1npm --version
): 10.2.0Desktop (please complete the following information):
Not relevant but here you go:
Smartphone (please complete the following information):
Not relevant.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: