Since your discussing port forwarding I assume you are referring to using the device outside the local network. If that’s the case you need to use the outside IP address. From within your home, you can find this out by going to http://wimi.com
With that said, I am not entirely sure that’s your issue. I also noticed you mentioned the Hosted-Controller. This distribution is for the native apps at this point (although you also mentioned main.php, which is not a part of the hosted controller).
Might need some more information to be able to assist further.