In my local dev environment, I use Windows Subsystem for Linux (WSL) on Windows 11. I have NGINX, Apache2 and Litespeed available there. Each of them (typically) function correctly, independently.
After a recent reboot, I'm getting nothing when i point the browser to localhost/ 127.0.0.1. I primarily use NGINX, so let's look. [at that log ]
So, looking at the date, we can see that April 28 is not today, so nothing has been logged since the error started. I've tried Apache, and LSWS as well. No updated logs there either. the PHP-FPM shows it ran and shutdown, but no insight there. [Note the 404 error. Looks like NGINX?] - The error appears the same, regardless of the server i'm trying to use.
I'm stumped. I can't think of anything to try to debug this. The same error appears of course even if WSL isn't running. I thought maybe hosts file as I'd made some changes recently, but i don't think that's the issue either: (win11 ./hosts )
127.0.0.1 localhost
# ::1 localhost
10.0.0.165 mxlinux21
Where should I begin? It's always something after a Windows update. I'm so sick of reinstalling and reconfiguring WSL/ Apache, whatever. I know: I can't complain if I'm using Windows. I keep a linux box for (in)sanity.
I have checked logs. I expect the http server to serve PHP pages on localhost.
I see this all goes back to my attempted System recovery after the Windows Update KB5025305 . That's been about a month ago now. I forget what KB5025305 caused to stop working by now, but I think it had something to do with WSL (wsl2g) no longer working. So I rolled the system back / uninstalled that update. I'm honestly not sure. You know how it can be when you're trying all sorts of different things to get your system back after an update.
Anyway. I have a browser extension which shows HTTP headers. I happened to notice that it showed the error was served by Microsoft-HTTPAPI/2.0 - which finally gave me the insight i needed to find this StackOverflow thread. I don't have IIS installed on this system, but apparently I enabled some Windows additional/ optional OS features which rely upon the Microsoft-HTTPAPI 2 which allegedly can intercept HTTP requests of non MS servers running on Windows.
again. not sure really. But if you're having this issue, try this. Open a command prompt %COMSPEC% and execute the following:
net stop http
In doing so, the following was output:
C:\prompt> net stop http
The following services are dependent on the HTTP Service service.
Stopping the HTTP Service service will also stop these services.
MultiPoint Service
SSDP Discovery
Print Spooler
Function Discovery Resource Publication
Do you want to continue this operation? (Y/N) [N]: Y
The MultiPoint Service service was stopped successfully.
The SSDP Discovery service is stopping.
The SSDP Discovery service was stopped successfully.
The Print Spooler service is stopping.
The Print Spooler service was stopped successfully.
The Function Discovery Resource Publication service is stopping.
The Function Discovery Resource Publication service was stopped successfully.
The HTTP Service service is stopping........
The HTTP Service service could not be stopped.
Regardless of it "could not be stopped", requests to http://localhost are now being served by NGINX as installed on WSL. So, there it is. In my case at least. Hope that helps someone.
Cheers, and best regards!