HTTP

As you might guess, we can also do a one-line HTTP server. Do NOT use this as a production HTTP server!!

I check my Ubuntu server's IP address, its 192.168.1.153.

I open a terminal in my home directory and I run

python3 -m http.server

and then check a web browser from a W11 client. It defaults to port 8000.

Better if I create a directory called WebServer and create a dummy file.

touch WebTest.txt

I make that my working directory, before running the web server.

If I want to limit access to the machine I'm on, I can use the 127.0.0.x loopback addresses. This web server can only be reached from the local host.

python3 -m http.server -b 127.0.0.2 8080