Is that just for easy access within your local network? Because nothing will be secured with Nginx that way. Thats why everyone normally uses the Reverse Proxy solution and does not expose port 8080 externally.
Follow above tutorial and your nginx config file,and if you set up successfully ( test with command sudo nginx -t ), you type on browse with http://localhost ( on your server ) or http://openhab_ip ( on other devices ), it will ask you username and password. When login successfully, the address bar on your browse will rediret to localhost/start/index or openhab_ip/start/index ( it’s not localhost:8080/start/index or openhab_ip:8080/start/index ) .
Because when you use Nginx Reverse Proxy, it’ll not expose port 8080.
Ok, It’s correct inside to local network, but for entry in my openhab from outside my local network, Have I that open a port in my router distinct to 8080 for not expose the port 8080? and If I open the port for example 1234. Will I have that modify the config file NGINX?
I would not advise you to open http / port 8080 on your router. there is nothing encrypted and everything will be sent in the clear. If you really want to open a port on your router to access your openhab I strongly suggest using https for example open the port 443 on your router and use nginx to redirect to 8443 on the openhab server. In the documentation you will see how you can use certificates to do that.
You need to adjust your nginx configuration accordingly ie ask for a username and password to authenticate externally otherwise everybody will have access to your openhab etc
An easier way to access your system would be to use myopenhab.org which is openhab’s cloud service