I cant access nginx web server installed on WSL from my local network

I have installed Nginx on Ubuntu 22.04 which is installed on WSL 2 (Win 11). My Ubuntu instance IP is 172.20.158.128 and my computer IP on local network is 192.168.254.200. When I open http://127.0.0.1 or http://172.20.158.128 on my browser on my own computer I see Nginx’s default page but when I open http://192.168.254.200 from other computers on my local network , page is not accessible and I get ERR_CONNECTION_REFUSED error. firewall on but Ubuntu and Windows are turned off.

Nginx configuration is default and I didn’t changed anything.

How can I configure Nginx to be accessible from my local network

Leave a Comment