google-chromegoogle-chrome-os

chromeos - chrome can't reach 127.0.0.1:8080


I am on chromebook and testing php web server from Termux via

php -S 127.0.0.1:8080 -t /sdcard/Download/webserver

I tried to open the webpage in Chrome (127.0.0.1:8080) but it returned this error message: ERR_CONNECTION_REFUSED. It works on Firefox and even Chrome Beta browsers via android so I know the web server is up and running. I've cleared caches, flushed DNS and done whatever solutions google search came up with and none works. What's up with Chrome? Any solution?


Solution

  • Android apps run from an isolated environment on ChromeOS, you will need to get the ip address. From termux, try ifconfig arc0 and look up the ip address and use that instead of 127.0.0.1.