I am working on a group project for school and we are trying to use a Plone 6 webpage on a school server. On the server we have access to a personal VM that we are installing our Plone webpage on.
We are not using docker or any sort of container for our Plone installation. When we load our webpage we are able to get a lot of our backend content, however, when looking at the network tab on the webpage it appears as though any file that has the URL tag "localhost:3001" is not loading. It looks to be a handful of JS files.
Our site url is something like ourVM.:3000/sitemap. Yet the JS files that do not load are somethign like "localhost:3001"
Our understanding is that for some reason when we connect to the webpage, the JS files are referencing our PC localhost:3001 instead of the VM's port 3001.
Is there some easy way we can fix this? It feels as if there should just be some configuration we change to access the correct URL. We installed via cookieplone and all ports are open to access remotely.
@sneridagh Lots of people try to do development on a different hostname for different reasons (maybe a remote VM, or a local container, or a custom project.localhost mapped to 127.0.0.1) so we should try to make this work. But, it doesn't currently, and the solution wasn't obvious the last time I looked.
@davisagli I think the following is not an advice to @HoboHoppy because he targets production, but targets your response.
After some weeks I can suggest the VSCode Remote SSH extension. It was helping me a lot to develop on an internal native Intel/AMD server under Ubuntu LTS24 from my M1 Mac while I thought I was struggling with ARM based machines.
Basically you do not need to set the HOST=externalIP/Domain env variable for running the frontend on the server and access it from outside.
You just configure the SSH connection to allow VSCode to access the server. This needs to install some helpers there.
The port redirection for 3000, 8080, 3001 is handled by VSCode locally without the need to touch tunnel commands. Even port conflicts are handled and the ports are modified. You can then see all redirections in the Ports tab next to the Terminal , Problems etc. views.
This of cource works also with local VMs e.g. based on Multipass and WSL, if no plattform issues come into your way.