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

Web panel 404 when behind nginx #25

Open
cm-360 opened this issue Aug 28, 2022 · 3 comments
Open

Web panel 404 when behind nginx #25

cm-360 opened this issue Aug 28, 2022 · 3 comments

Comments

@cm-360
Copy link

cm-360 commented Aug 28, 2022

Describe the bug
When the web panel is hosted through a proxy server such as nginx, rather than port-forwarded directly, and is not accessible from the root of the web server, the panel's webpage fails to load completely because the required scripts are accessed in a non-relative fashion.

To Reproduce
Steps to reproduce the behavior:

  1. Start MCSS with the web panel configured as below.
  2. Start nginx with a proxy_pass directive configured in your server block for MCSS, for example:
server {
    ...
    # MCSS
    location /apps/mcss/ {
        proxy_pass http://[Private address displayed in web panel tab]:8833/;
    }
}
  1. Attempt to reach the web panel through nginx using the newly configured location.
  2. The page itself will load fine but the web panel will not because the GET requests for the necessary scripts fail.

Expected behavior
The links should be relative to account for setups like this and the panel should load as normal.

Screenshots
Web panel configuration in MCSS:
MCSS web panel config screenshot
Failed GET request for start-4288749f.js:
Screenshot 2022-08-27 203650
The 3 offending link elements in the received HTML:
Screenshot 2022-08-27 203712

Desktop:

  • OS: Windows 10 Pro 21H2-19044.1889
  • Browser: Firefox 104.0
  • MCSS Version: 13.0.4
  • nginx: 1.23.1

Additional context
When accessed through the appropriate local address, the web panel loads with no issues.

@Fiahblade
Copy link
Member

@cm-360 Hi, I didn't receive a notification. My apologies.
I'm releasing a new version later today, I don't think this will help but you can try.

After some research I stumbled upon this sveltejs/kit#2958 this does seem related.

@cm-360
Copy link
Author

cm-360 commented Nov 17, 2022

I apologize for my horrendously long reply time, I've been busy with classwork and haven't done much Minecraft lately. I just tried the latest update and it seems to have the same issue, although I did peek at the sveltejs issue you linked and it definitely looks related.

I'm honestly not too upset about the web panel not working since I have remote desktop access to my hosting machine and the full interface still has the most features, but I do appreciate you taking the time to look into it. I also am planning on overhauling my hosting setup pretty soon, so if I come across any fixes (band-aid fix or not) I'll be sure to mention them here, in case other people stumble across this issue.

@Fiahblade
Copy link
Member

Thank you for getting back to me, will continue to evaluate this issue. (I see some promising activity in that sveltekit issue)

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

No branches or pull requests

2 participants