Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
make the VM reachable from your laptop and point the site domain to the VM’s IP. Here’s a quick checklist that works reliably:
Put the VM on a network the laptop can reach. Easiest: switch the VM NIC to Bridged mode so it gets an IP on the same LAN. (Alternative: keep NAT and set port-forwarding for 80/443 from host to VM.)
Find the VM IP: ip a (look for the address on eth0/ens*).
On your laptop, add a hosts entry mapping the site domain to the VM IP, e.g.: 192.168.1.42 portfolio.local
(Use the exact domain LocalWP created for the site.)
Make sure the web server inside the VM is listening on the VM IP (or 0.0.0.0). Check ss -tlnp | grep :80 and adjust Apache’s Listen if needed.
Open firewall ports on the VM: sudo ufw allow 80,443 (or the equivalent firewall tool).
Test from the laptop browser: visit the domain you added to hosts.
That’s it — bridged networking + hosts entry (or NAT + port forwarding) + firewall rules will let your laptop load the LocalWP site running in the VM.
I’m trying to better visualize how these systems are configured. Is there a reason for not accessing the site from within the VM using the RDP browser?
If you do need access from the Windows Host, what commands or use case is required?
Along those same lines, are there specific parts of access you are having issues with? For example, I could imagine it would be easier to access the frontend of the site than the backend.
Having a bit more context around this should help us give you a little more guidance on how to get you taken care of!
No drama and appreciate any assistance you can give me.
For security reasons many of the applications and services that I would need to run for development are deemed allowable by the IT team.
I run development via Ubuntu VM that runs Apache and connect to develop using RDP.
Using the laptop browser, I navigate to a website, and the Apache server responds with the page. In most instances, I setup a WordPress website without requiring LocalWP.
I was hoping to fast-track the headless journey by leveraging LocalWP to spin up a headless site using a blueprint for testing purposes. As I’m unable to effectively run LocalWP Headless setup without running the application as an Administrator.
My hope is to operate so I have RDP open with an IDE for code development on one screen.
On the second screen is the web browser running on the laptop showing the site I develop. As per this screen where each window is in its own screen.
It makes development easier and closer to a live environment setup. I want to develop headless in the same manner.
I wanted to find out if anyone has a similar setup, and what configurations are required to allow the laptop/computer which runs the VM, to make a request for the Frontend of the website?
This may not be possible, as this could be an issue regarding the configuration of the Apache server.
I’ve never done this sort of setup before, but I think what you would need to do is somehow configure port forwarding from the Host machine to the ports used for the site in the VM.
For Headless sites running in Local, there are two urls that are significant:
Frontend - the headless client app
Backend - the WP admin (ie, where you edit the content)
So in theory, using the ports in the above screenshot, I think you would:
Stop the VM
Within the VM settings, look for options related to networking, and in particular, port forwarding
Add some port forwarding rules from the host machine’s port to the frontend/backend ports of the site in the VM. Local tends to use ports that are open, so you can probably just map the same port number from the host to the port in the vm.
Start the VM and start the site within Local
Access the site (frontend, or backend) from the port on the host machine. So something like localhost:<whatever-port-youre-forwarding>
As a side note, I think that the guidance given by @harry is directionally correct, but the problem would be that those instructions only get you connected to port 80 of the VM. That might work with Local’s Router proxying the frontend of hte site, but you wouldn’t have any way of connecting to the WP backend.
Anyway, see if you can get something working with port forwarding. I’m sure there are little gremlins in here, but it sounds like an interesting problem that IT has provided you !