Apache ProxyPass - Non-relative calls make it fail as /isleward/ on existing website
Hi there! Cool game!
Decided to run the server on my own web-server because of too much message-spam from other players. Installation was easy. Cudos!
Then decided to run it via HTTPS. Since I have Apache listening on port 443 already and serving an existing website, I had to use that instead of NGINX.
So I added this configuration to my Apache, to make Isleward available in a sub-URL:
<Location /isleward/> ProxyPass http://127.0.0.1:4000/ </Location>
Since the websocket is using non-relative path, I also had to add:
<Location /socket.io/> ProxyPass ws://127.0.0.1:4000/socket.io/ </Location>
(This probably has to be added in any case - but Location /isleward/socket.io/
would allow multiple use of socket.io on this host.)
Now the login screen showed up. Logging in also worked but the next screen (character selection) didn't show because of a non-relative call to /ui/templates/smithing/templateItem.html. I had to add this:
<Location /ui/> ProxyPass http://127.0.0.1:4000/ui/ </Location>
Now the character selection was showing but the images of the characters weren't because of a non-relative call to /images/characters.png. I had to add this as well:
<Location /images/> ProxyPass http://127.0.0.1:4000/images/ </Location>
Now everything works as expected!
I mean, it's not a deal-breaker for me at the moment but it could be for other websites that need to run Isleward in a sub-URL and use /ui/ or /images/ already - so having those referenced relatively would make things much easier.
Thanks for your time and for sharing this game, of course!
Cheers, Marc