Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianlesko/reverse-proxy-nginx-docker
Map any app running on localhost/PORT to localhost/app_name using this code
https://github.com/brianlesko/reverse-proxy-nginx-docker
Last synced: about 20 hours ago
JSON representation
Map any app running on localhost/PORT to localhost/app_name using this code
- Host: GitHub
- URL: https://github.com/brianlesko/reverse-proxy-nginx-docker
- Owner: BrianLesko
- Created: 2024-04-25T16:42:49.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-24T17:33:52.000Z (3 months ago)
- Last Synced: 2024-08-24T18:59:11.908Z (3 months ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Nginx Docker reverse proxy
---
I no longer reccomend using nginx. Caddy Server is the only reverse proxy and web tool I would reccomend for self hosting local or public web applications.---
Access your web application via http://server/name rather than http://server:PORT by running this code. The code here can be upgraded to allow https by getting a certificate.
Nginx is also great for serving http file servers.
Nginx is however more complex to setup than more modern options like Caddy server, which I have started using isntread of NGINX.
## Software Dependencies
This code uses the following dependencies:
- `docker`
## Usage
1. clone this repository
```
git clone https://github.com/BrianLesko/reverse-proxy-nginx-docker
```
2. make sure your app is running at your IP:PORT
3. edit the nginx.conf file and change the port and pick an appname
```
location /appname {
proxy_pass http://host.docker.internal:*8501*;
...
```
4. run start.sh
```
./start.sh
```
5. Navigate to your application
servername/appname
## About
Running your web apps with a reverse proxy is more user friendly, even necessary for production level deployment. I wrote this repository with 3 intented use cases. One, to use this code to deploy
a vacation planning app for management level employees at a local business. Two, to access multiple apps easier related to a mobile robot I built. And three, to deploy various automation service softwares.
╭━━╮╭━━━┳━━┳━━━┳━╮╱╭╮ ╭╮╱╱╭━━━┳━━━┳╮╭━┳━━━╮
┃╭╮┃┃╭━╮┣┫┣┫╭━╮┃┃╰╮┃┃ ┃┃╱╱┃╭━━┫╭━╮┃┃┃╭┫╭━╮┃
┃╰╯╰┫╰━╯┃┃┃┃┃╱┃┃╭╮╰╯┃ ┃┃╱╱┃╰━━┫╰━━┫╰╯╯┃┃╱┃┃
┃╭━╮┃╭╮╭╯┃┃┃╰━╯┃┃╰╮┃┃ ┃┃╱╭┫╭━━┻━━╮┃╭╮┃┃┃╱┃┃
┃╰━╯┃┃┃╰┳┫┣┫╭━╮┃┃╱┃┃┃ ┃╰━╯┃╰━━┫╰━╯┃┃┃╰┫╰━╯┃
╰━━━┻╯╰━┻━━┻╯╱╰┻╯╱╰━╯ ╰━━━┻━━━┻━━━┻╯╰━┻━━━╯
follow all of these for pizza :)