While I run sites via Local, I also run sites via Docker containers that may use 127.0.0.1:80 for web traffic. Once Local has been opened on my computer, I have to restart the computer to free these ports back up. After exiting Local, but w/o restarting the computer, trying to access domains assigned to 127.0.0.1 show the Local 404 page (" The site you requested does not have an associated route in Local. If you continue to get this message after refreshing, try restarting the Local site.").
Troubleshooting Questions
Does this happen for all sites in Local, or just one in particular?
N/A
Are you able to create a new, plain WordPress site in Local and access it in a Browser?
N/A
Replication
Open Local
Start a site
Stop site
Close local
Run another site on 127.0.0.1. Current use case is Docker w/in WSL2, but could also apply to WAMP, XAAMP, etc.
See Local 404 page
Clear cache, disable cache, whatever
Still see Local 404 page
System Details
Which version of Local is being used?
6.4.3+6116
What Operating System (OS) and OS version is being used?
Win11 Pro, 21H2, build 22000.978
Attach the Local Log. See this Help Doc for instructions on how to do so:
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.
@Nick-B I’d like to add that I don’t think that it’s related to either mode. I would wager the bug is that Local isn’t freeing port 80 when you stop a site or close the application altogether. To go step by step through my troubleshooting of this theory:
Btw - if you’re encountering this bug, skip to the last 4 steps to continue work w/o restarting your computer.
Boot computer
Check out what’s happening on port 80 with netstat -ano | find "80" | find "LISTEN" and then wmic process where "ProcessID={process listening on 80}" get ProcessID, ExecutablePath Any time these steps reference activity on port 80, this is the process used to determine that
Nothing on 80
Start Local
Nothing on 80
Start site
Port 80 is occupied by Local’s Nginx service (C:\Users\Ethan\AppData\Local\Programs\Local\resources\extraResources\lightning-services\nginx-1.16.0+6\bin\win32\nginx.exe)
Stop site.
Same process still living on port 80
Quit Local
Oddly enough, while writing these instructions, port 80 was freed!
Start Local again
Start site again
Port 80 occupied again
Stop site
Quit Local
Port 80 still occupied by Local nginx process
Start Local
Start site
See a second process is now listening on port 80! Also Local’s nginx executable.
Stop site
Switch router mode from “Site Domain” to “Localhost”
See the second nginx process has stopped, but the original one is still listening
quit local
80 still occupied
open task manager
find nginx.exe
force quit
80 is available
Obviously there’s a lot there, and I don’t know if it’ll help reproduce, but Local is not reliably stopping its nginx process.
Hi @sternerstuff! Thank you for all of the details here that is super helpful. I’ve raised this with our dev team. The intended functionality should be that Local is killing these processes upon shut down but after testing it does seem to be intermittent at times. We are going to look into this further with some more testing and see what can be done! We’ll be sharing any updates here or reaching out if we need any other follow-up.