Okay. I think I’m now one step further. I configured a vhost for pimatic and redirected the node app to my apache server.
First thing I had to do was to change the pimatic port in the config.json
from 80 to a random (in my case 8587 just because I like this number).
Then I had to give apache a proxy to access the node application on this specific port to my desired path.
In my case:
ProxyPass /pimatic http://127.0.0.1:8587
ProxyPassReverse /pimatic http://127.0.0.1:8587
So far, so good. Now I see a minimal frontend Minimal because the assets and files are not loaded properly b/c it’s still looking for them on https://myraspi.dns.tld/
and not https://myraspi.dns.tld/pimatic
.
One idea was to write a RewriteRule for it in the apache vhost.
The other idea (and in my opinion more clean) is to set a BaseUrl inside the template. So I added <base href="https://myraspi.dns.tld/pimatic">
to app/views/layout.jade
.
With this the socket.io.js and the decl-api-client.js dissapear from the 404 list.
But base.css, style.css, lazyload.js, base.js and index.js are still 404. Because the path starts with a slash. (points to /assets instead of /pimatic/assets)
Which lead me to the next problem:
The assets are loaded via the nap module (e.g != nap.css('base')
). This module has the @_assetDir
variable set to "/assets"
.
I’m not really sure if I’m still on the right track here. But shouldn’t it be possible to configure the base url in the config? And shouldn’t the assets always be a relative path?
I really could need some guidance here. Either I’m the only person who wants to archieve this or this is simpler than I think.
@jensebub? @sweetpi? @leader21 ? Anybody? I know you guys have a lot to do, but a short statement would be awesome!
best,
fletcher