Apache server can be set up and accessed from ouside Network in the following way: http://lifehacker.com/124212/geek-to-live--how-to-set-up-a-personal-home-web-server I want to achieve similar functionality with python SimpleHTTPServer. How is this possible?
What is the best way to access a home server from an outside network? Depends what you want to do. But you will need either a fixed IP address or dynamic dns client to connect to your home server. Then you can access it using SSH or remote desktop. You could install a ftp or webserver on your home server and access it through that.
Note that python -m SimpleHTTPServer works only with python 2. With python 3, you should use: python -m http.server Step 2: Edit your router's configuration to forward port 8000 to the computer on which you ran the python command. Step 3: Determine your home network's IP address, for example, 203.0.113.47
You also can use SimpleHTTPServer as a file sharing method. You just have to enable the module within the location of your shareable files are located. I will show you several demonstrations in this article by using various options. 1. Check whether python is installed in your server or not, by issuing below command.
You’ll need to forward a port to the server machine. Then you can access the server with your public IP address and the port number. Usually through whatever type of interface the server is hosting. E.G. a web browser defaults to port 80 but something like Dropbox uses some for their interface such as 17500.
Step 1: Run this command "python -m SimpleHTTPServer". Note that python -m SimpleHTTPServer
works only with python 2. With python 3, you should use: python -m http.server
Step 2: Edit your router's configuration to forward port 8000 to the computer on which you ran the python command.
Step 3: Determine your home network's IP address, for example, 203.0.113.47
One convenient way to determine your home network's IP address is to consult any of the what-is-my-ip websites, for example https://www.whatismyip.com/.
Step 4: From outside your network, visit (for example) http://203.0.113.47:8000/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With