When I use python3 -m http.server as far as I know it's supposed to create a webpage of my machine.
I did that and I managed to open the page in the same machine, but I couldn't open it in another machine. It just shows me "Unable to connect".
Okay so regardless of what you have tried so far, I'll show you the whole process or how I usually do it
Go to the directory you want to serve the content of
Run python3 -m http.server 8080
Now if you open in the browser of the same machine you can use localhost:8080 but if you want to open it in another machine then make sure both machines are connected to same network and note down ip address of the first machine
Then in the second machine's browser enter the following:
ipaddressofyourmachine:8080
e.g: 192.168.1.2:8080
I cannot use the page from python3 -m http.server