Local Webserver Problem

Hi everyone,
I´m trying to setup the WebApp on a VM (“farmbot”) on the server of my company. The Webserver and the mqtt server are running so far and the front page is loading, too. But I´m still getting error messages, which are in my opinion caused due to path issues. I already addedconfig.action_controller.relative_url_root = "/farmbot" in ~/Farmbot-Web-App/config/environments/development.rb and now the assets folder is found. I can open the images on https://.com/farmbot/app-resources/images/ instead of https://.com/app-resources/images/. The server redirects https://*.com/farmbot to the VM where the webserver runs.
In the developer console I see, that the languages are loaded from a different origin than the front_page.js and the assets (see picture).
I´ll post some pictures of my console output after rails api::start, too. Maybe the problem is already here…
At the moment I´m pretty frustrated, because I tried out nearly everything in my eyes… I hope you can help me!
Thanks a lot, Carlotta

@RickCarlino Do you have any advice for me?:sunglasses:

@KarlOtta The web app was not designed to be mounted at arbitrary relative roots- it expects to exist at the expected paths. There are a number of places where the app will break if it is not mounted at /.

If you have experience with Rails / Webpack, you can continue to hunt down URLs and manually update them, but there will probably be many edge cases and my ability to assist self-hosted users is limited.

If you still wish to attempt this (it might be possible still, but again, I don’t recommend it) here are the places in the codebase that will need to be updated:

This is not an exhaustive list and there may be other places in the app that require updates. You will need to manually check the JS console and perform a global search of the project for the affected URL(s). There might also be code in farmbot.js that requires updates, but I have not checked. Please keep this in mind if you start seeing URL errors that you cannot trace back to the main source of the app.

My ability to provide support for these sort of use cases is limited.

1 Like