Myopenhab not showing html table

Hi!

On my OH I have installed apache where I host HTML page created with php, which is located in “/var/www/html/”. Page is basically a HTML table where I show data from Sqlite3 database and user is able to modify rows. Content is shown via Webview - url: “localhost/info.php”.
When I connect to the OH locally, everything works perfect, but from the “myopenhab.org” Webview is not shown. I also tried to show basic HTML page, which I put in “/etc/openhab2/html/”, but it also doesn’t work. However images from that directory are shown.

Any ideas how to fix that?

I would appreciate your help. Thanks :slightly_smiling_face:

The openHAB Cloud Connector and myopenhab.org server provides a proxy ONLY for the openHAB REST API. To get your Apache served page visible through myopenhab.org you will need to put this page exposed to the internet and use the external url as the address in the Webview.

The reason why the images work though is part of the REST API is a webserver (obviously) which is able to serve out images natively. When you use the Image element, you are asking OH’s webserver to serve it to the page.

Your solutions will be either existing this Apache page and make it agreeable from the internet, it figuring it if you can host it through openHAB itself in the conf/html folder.

Thanks. So, I opened a port, but there is a problem I don’t understand.
If I access this file (xx.xxx.xx.xx/file.php) via mobile network on my mobile phone, it works and I see the content of the file.
But if I want to access this URL via local computer I get 404 error - File not found. File is located in /var/www/ directory, which is used in sitemap like “http://xx.xxx.xx.xx/file.php”.

Any ideas?
Thanks in advance :slight_smile:

Are you using the exact same url in not cases?

Is your router configured to short circuit public IP traffic that is destined for the local network? For example, when on your LAN and you bring up your public URL the router sees that the address is actually it’s own public address and it tries to keep all the traffic local, and sometimes it doesn’t do a very good job of doing that.

Thanks for fast reply. Yes, I have just figured out that I had to enable “NAT loopback” in my router settings.
Now it works :slight_smile: