Eggy Eggy - 6 months ago 17
Linux Question

How to visit site hosted on localhost from android deivice in the same network?

Alright, I think this question was posted many times before, but I just can not get this to work.

I got simple hugo website which is hosted on localhost(I use

hugo server
). Now I want to display this site on my android device. To see my IPv4 ip adress I click on internet icon, select "information about connection". Then I open up a adroid browser and go to the address:
http://<ip address>:<hugo port>
but I got an error: "server rejected connection". My example ip address is something like:
192.168.1.5


I made it work with windows, but just can not get this to work with linux.

Answer

You should change server ip to 0.0.0.0 to expose to a network

Like hugo server --bind="0.0.0.0"

Comments