How to access the local files externally through ngrok and python HTTP Server?

preview_player
Показать описание
#accessfilesexternally #httpserver #ngrok
In this video let us see how to share or access the local files externally through ngrok and Python HTTP server.

I have the following two scenarios
• First one is the need to share a set of files externally
• The next one is the need to share a simple website externally

The above two scenarios can be achieved through Apache Server and external DNS configurations but require more configurations efforts.

Let us see how to enable the above scenarios through ngrok and python HTTP server with minimal configuration effort.

The ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on.

On the free plan, ngrok’s URLs are randomly generated and temporary. If you want to use the same URL every time, you need to upgrade to a paid plan so that you can use the subdomain option for a stable URL. There are different paid plans they will provide some advance features like custom/reserved domains and multiple tunnels etc

Download the ngrok for the required OS and extract files

Python standard library comes with an in-built web server which can be invoked for simple web client-server communication

The required port number can be assigned and the webserver is accessed through this port

My system has python version 3.7.0 installed— “py -vi”

In the first scenario, I want to share some regular files externally

Now the files are accessible through localhost

Let’s now start ngrok to share this folder externally, cd to the folder where ngrok was extracted(C:\Albin\SW\ngrok-stable-windows-amd64)

Now the external requests(http/https) are forwarded to the localhost webserver through ngrok proxy domain

Re-start the HTTP server, the pages are now accessible outside (Show)

The traffic can be monitored through the following URL — @

The ngrok and python HTTP server can be used to share the local files externally without much effort and configurations.
Рекомендации по теме