Giter Site home page Giter Site logo

flask-reverse-proxy's Introduction

flask-reverse-proxy

Local flask based reverse proxy webapp. The flask app acts as a reverse proxy allowing you to host multiple webapps and redirect based on the url list.

run the application with

python reverse_proxy.py

then access some url in any other system's browser to the host system's local ip address lets say you visit http://192.168.1.101

you will get redirected to the locally hosted app lets say http://localhost:5000

if you have pihole setup on your system or network you can configure the dns record and add "A Records" to have your own DNS and access webapps with your own local domain names

Lets say on System A you have hosted a webapp locally. Now you can bind only one app to port 80. But you want to host multiple webapps locally. So whats the solution?

Solution:

You can host your webapps on different ports/sockets(.sock) and use this reverse proxy to serve them on port 80.

First host your webapps locally on different ports , lets say 5000 and 5001.

Then you update the reverse proxy python scripts dictionary to

"webapp1.local":"http://localhost:5000"
or
"webapp1.local":"http://unix:/home/subrata32/webapp1/hsecure1.sock"

"webapp2.local":"http://localhost:5001"
or
"webapp1.local":"http://unix:/home/subrata32/webapp2/hsecure2.sock"

Then update your pihole dns A Record with

webapp1.local -> 192.168.1.101 # your local ip address

webapp2.local -> 192.168.1.101 # your local ip address

flask-reverse-proxy's People

Contributors

subratasarkar32 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.