I've just installed magento 2 based on Windows using Xampp .. and it is working fine. my problem is, i purchased a domain name for it and put it in httpd-vhosts but i can't access it from outside (WAN).
Note: i can access the xampp dashboard page through https://domainname/dashboard but when i type https://domainname/magento to access magento it is loading for 1-2 Mins and change the url in the browser to the localip! like this: http://localhost/magento
and for sure i can't access Magento server local IP or localhost from outside
I think there is an issue in file located in magento folder that cause the redirection problem.