If you want to access php in the VM from the host, you need to disable the proxy for the host and set the firewall in the VM not to block the host's ip.
Setting up a virtual machine firewall method:
Find host IP: win+r, type ipconfig
Open the virtual machine, type su, enter the password and use root privileges
Type ufw allow from <host ip>.
If you're a little more daring, you can just type ufw disable to turn off the firewall
Turn off the host proxy method:
-
Google Chrome:
- Click on the menu button (three vertical dots) in the upper right corner of your browser.
- Select the Settings option.
- Click on the "Advanced" option in the left menu of the settings page.
- Under the "System" section, click "Open your computer's proxy settings".
- In the window that opens, uncheck the Use a proxy server option.
-
Mozilla Firefox:
- Click on the menu button (three horizontal lines) in the upper right corner of your browser.
- Select the Options option.
- Click on the "Advanced" option in the left menu.
- Under the "Network" tab, click the "Settings" button.
- In the window that opens, select "Agentless".
-
Microsoft Edge:
- Click on the menu button (three vertical dots) in the upper right corner of your browser.
- Select the Settings option.
- Under the "System" section, click "Open your computer's proxy settings".
- In the window that opens, uncheck the Use a proxy server option.
-
Safari:
- Click on the "Safari" option in the menu bar.
- Select the Preferences option.
- Click on the "Advanced" tab in the window that opens.
- Under "Change Settings", click the "Proxy" button.
- Uncheck "Use a proxy server".