None of these answers mentioned turning on the Apache HTTP Server from Windows Defender Firewall. Using XAMPP v. 5.6.40, you can try this solution:
- Go to Windows Defender Firewall, click on Inbound rules and look for Apache HTTP Server. There will be two instances of this rule.
- Double click on it and set the Action to Allow the connection.
- Go to the Advanced tab and tick Domain, Private, and Public options from the Profiles section.
- Go to the Protocols and Ports tab and configure your local ports. By default, XAMPP server runs on port 80. If you're using multiple ports for web development, simply place commas after each port.
- Save your changes. Run cmd and type
ipconfig. Take note of your IP Address. - Restart Apache from your XAMPP Control Panel. Try accessing your app via address:port/path, where address is your IP address, port is your port (80 in most cases), and path to your project in /xampp/htdocs.