I did get it to work in the end. I followed this guide Securing Communication and Access | openHAB
This is what I have for my config files for the portion of the frontail part of my /etc/nginx/sites-enabled/openhab file.
My setup is now ‘identical’ to yours but still not working.
On my local connection i.e. ‘http://<local IP>:9001’ I get :
Cannot GET /
From the remote connection i.e. ‘https://<remote IP>/frontail/’ I get:
502 Bad Gateway
nginx/1.14.2
I have tried various combinations of using the explicit local IP or ‘localhost/127.0.0.1’ in the NGINX proxy_pass setting and the frontail config file --host setting.
All my other NGINX services (BasicUI, PaperUI, Grafana) work OK.
@fals3illusion
I got to the bottom of it! I had a slash ‘/’ at the end of the proxy_pass entry in my NGINX config (between the ‘1’ of ‘9001’ and the semicolon). Even though the other entries in the file have the slash and work OK it seems to cause a problem with frontail. My NGINX config frontail section now looks like this:
Sofar with the above I get a /frontail log page with orange header, but not get NO logs are showing
Under Network I get : 404 Bad request to wss://xxx/frontail/socket.io/?EIO=3&transport=websocket
In addition openhab3 only works with nginx location/ {…
if I change to location/openhab { …
I just get a black page as I believe its trying to check user rights… for some root location.
No unfortunately not.
I got grafana to work via location/grafana by adding the enabling url to grafana.ini.
root_url = %(protocol)s://%(domain)s:%(http_port)s/grafana
In /etc/systemd/system/frontail.service make sure that the Style sheet specified on the ExecStart line (the one after the ‘-t’) actually exists.
It should be present in the /usr/local/lib/node_modules/frontail/web/assets/styles directory. In Rar9’s example it would be a file named openhab_dark.css.
If it is missing, try to find it or change the config to point to default.css i.e. change -t option to default. I believe a default.css style is always present.
If that doesn’t work try this:
Edit /usr/local/lib/node_modules/frontail/web/index.html and see 'REMOVE LINE…'comment below.
<script src="__PATH__/socket.io/socket.io.js"></script>
<script src="__PATH__/tinycon.min.js"></script>
<script src="__PATH__/ansi_up.js"></script>
<script src="__PATH__/app.js"></script>
<script type="text/javascript">
var socket = new io.connect('/__NAMESPACE__', {
path: '__PATH__/socket.io',
transports: ['websocket'] ** REMOVE THIS LINE AND THE COMMA ON PREVIOUS LINE
});
window.load = App.init({
socket: socket,
container: document.getElementsByClassName('log')[0],
filterInput: document.getElementsByClassName('query')[0],
pauseBtn: document.getElementsByClassName('btn-pause')[0],
topbar: document.getElementsByClassName('topbar')[0],
body: document.getElementsByTagName('body')[0]
});
</script>