Nginx configuration was left as it is, and in system->network I set the duckdns address https://myinstallation.duckdns.org:8123, while for internal access I did not change anything (in my case http://2.0.0.10:8123).
External access works perfectly, but when I try to access the internal address http://2.0.0.10:8123 I get this error:
# 400 Bad Request
The plain HTTP request was sent to HTTPS port
---
nginx
When I try to access https://2.0.0.10:8123 I get: ERR_SSL_UNRECOGNIZED_NAME_ALERT
Well; I thought nginx would forward only the external address, but obviously it looks for the internal requests also. How can I configure it to get internal access from internal IP working?
Please excuse my ignorance, but what exactly do you mean by that? I have given the IP of the server, the excerpt from the YAML as well, can you please make your question a little more precise?
Are you sure that is how you are getting to the HA server via your external domain name. If so, you are port forwarding 8123 on your router to your Nginx server. Chances are your router is taking all requests for port 8123 and forwarding them to the Nginx server which is why when you use your internal IP it is also getting to the Nginx Server.
Please also note these two lines in your nginx configuration:
Those are include lines with the first pulling in any config files that start with nginx_proxy_default and the second pulls in all config files in the nginx_proxy sub folder.
Start by looking at these included files for lines that have ‘listen 8123’, which should be ‘listen 443;’. You would then need to check the port forwarding on your router so that port 443 is sent to your nginx server.