I need to know if there is any special code or general settings changes I need to make to access a PHP / Apache website on WSl2 on another device on same local wifi.
I have a PHP website running locally on Apache throguh WSL2 (Ubuntu 20.04). I can access this website through windows 10 through chrome with the PC running WSl2 with the address http://localhost/test_website/
Is there any specific code changes, I need to make inside of WSl2, PHP or windows? I assumed I would just be able to access this website and test on my phone / another device on the local area network with the IP address of the windows machine ( 10.0.0.107 ) but it does not work.
Not sure if the solution lies in PHP, Apache, WSl2 or a Windows setting to change.
Thank you.
I tried this:
netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=80 connectaddress=172.29.94.138
And opened and forwarded the port 80 on windows firewall.