在webview android中从我的服务器打开本地html页面

I have wampp server installed on my laptop. I have created a php/html page in wampp. Now I need to open this page in my Android app in webview. I am providing my app correct link of the page as http://myIPaddress:port/pageAddress but still it is not working. My phone and laptop are even connected to the same internet. In WebResourceError, I am getting errors like ERR_CONNECTION_TIMED_OUT. How can I open that page in my android app webview?

By default WampServer s Apache is only reachable for the localhost.

For WampServer 3 and above you need to edit your httpd-vhost.conf configuration. You can do this by left clicking your wampmanager icon in your tray -> Apache -> httpd-vhost.conf .

Then change:

Require local

To:

Require all granted

Restart the service afterwards.