Closed credomane closed 4 years ago
We specifically do not support running pterodactyl as a subfolder setup. We only support domain and subdomain hosting.
I didn't know it was unsupported. Is that in the install docs somewhere? If it is I haven't managed to find it. Would be nice to have this spelled out in the install docs. So someone like me knows it wasn't supported before I went looking into this and working on fixing it. lol. Oh, well.
If you fixed it why not PR the fix instead of posting a patch?
Well....That's annoying and rude of you github. Thanks so much for that. I had a response all typed up about ready to post and then sergix's post popped in and github decided to clear out my post. Guess I'll retype it but in notepad this time...grrr.
So I posted a patch file because I wasn't sure if everything was fixed and nothing broken. My understanding of Larvel is quite limited.
I've since noticed a few things. Setting the theme's asset-path to a full url breaks some stuff in the blade templates. Namely the include paths for keyboard.pollyfill.js, laroute.js, and autocomplete.js as sergix mentions.
Some AJAX requests fail because they aren't using the APP_PATH. I'm not really sure where to go about attempting to fix those.
It would be nice if at some point pterodactyl could support subfolder installation but with 0.7.x series in maintenance mode there is no point in continuing to fix this on this version. Plus to fully support subfolders a whole lot more needs changed/fixing than just some paths. As sergix said there is a lot of private things that are easily exposed right now if you just throw pterodactyl into a subfolder (and don't alias like I did.
@sergix I aliased /ptero to /var/www/pterodactyl/public/. The actual domain root resides elsewhere so no exposing of private things.
Oh yeah, laroute (which is used for routing AJAX requests) is also configured to use relative URLs, so you would need to change that in laroute.php config and then generate a new file.
May I ask why you do not simply have a dedicated subdomain for your panel?
PS: You tagged a wrong user ;)
This is working as intended, subdirectory installation is not supported.
@sergiz @DaneEveritt Definitely was confused when I got a notification from this thread, but thanks for doing so because this project is actually really neat! :smile:
Background (please complete the following information):
Describe the bug Installing pterodactyl with APP_URL = https://example.com/pterodactyl/ doesn't work as expected Technically it works but all included files are broken when actually visiting https://example.com/pterodactyl/ because they have incorrect urls.
To Reproduce Steps to reproduce the behavior:
Expected behavior Pterodactyl to behave as normal.
Proposed Solution I'm linking a gist with a patch file that seems to fix the issue. I've successfully logged in, created a node, imported custom egg, created a server and started/stopped said server. The patch itself.