Skip to content

This repository provides a Traefik + Nginx Reverse Proxy setup to manage and secure web traffic. It utilizes Traefik v2.5 πŸ›‘οΈ for routing and Let's Encrypt SSL πŸ” for automatic HTTPS certificates. Additionally, Nginx 🌐 serves as a secondary reverse proxy to forward requests efficiently.

Notifications You must be signed in to change notification settings

andrepradika/proxy-traefik-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌍 Traefik + Nginx Reverse Proxy

πŸ“Œ About

This project sets up a Traefik v2.5 reverse proxy πŸ›‘οΈ and an Nginx container 🌐 to manage traffic and securely route requests to your services. It uses Let's Encrypt SSL certificates πŸ” for secure HTTPS connections and makes it easy to handle domain-based routing.


πŸš€ Features

βœ… Traefik as Reverse Proxy – Handles incoming traffic efficiently.
βœ… Let's Encrypt SSL – Automatic HTTPS with free SSL certificates.
βœ… Dockerized Setup 🐳 – Easily deploy and manage with Docker Compose.
βœ… Domain-based Routing 🌍 – Routes requests to different services.
βœ… Nginx for Custom Proxying – Acts as a secondary proxy for specific requests.


πŸ“¦ Services

πŸ”Ή Traefik (Reverse Proxy & SSL)

  • Manages HTTP(S) traffic.
  • Automatically generates SSL certificates via Let's Encrypt.
  • Routes requests to services based on domain names.

πŸ”Ή Nginx (Custom Reverse Proxy)

  • Serves as an additional proxy layer.
  • Configurable via nginx.conf.
  • Routes requests to https://damarsalaka.com.

πŸ› οΈ Setup

1️⃣ Clone the Repository

git clone https://github.com/yourusername/proxy-traefik-nginx.git
cd proxy-traefik-nginx

2️⃣ Create & Configure nginx.conf

Make sure your nginx.conf file exists in the project directory and is properly configured.

3️⃣ Run the Containers

docker-compose up -d

This will:
βœ… Start Traefik to handle traffic.
βœ… Start Nginx as a secondary reverse proxy.
βœ… Enable SSL certificates via Let's Encrypt.


πŸ”§ Configuration

🌍 Domain & SSL Configuration

Modify the traefik service labels in docker-compose.yml to match your domain and email:

- "traefik.http.routers.api.rule=Host(`traefik.yourdomain.com`)"
- "traefik.http.routers.salaka-proxy.rule=Host(`yourdomain.com`)"
- "--certificatesresolvers.myresolver.acme.email=your@email.com"

πŸ“„ Custom Nginx Configuration

Update the nginx.conf file to customize the proxy behavior.


πŸ“‚ File Structure

traefik-nginx-proxy/
│── letsencrypt/         # Stores SSL certificates
│── nginx.conf           # Nginx configuration
│── docker-compose.yml   # Docker Compose configuration
│── README.md            # Documentation

🏷️ Topics

πŸ”Ή Reverse Proxy – Efficient traffic handling and load balancing.
πŸ”Ή Traefik – Dynamic reverse proxy for Docker.
πŸ”Ή Nginx – High-performance web server and proxy.
πŸ”Ή SSL & Security – Automatic HTTPS with Let's Encrypt.
πŸ”Ή Docker & DevOps – Containerized deployment.


πŸ›‘ Stop & Remove Containers

To stop and remove the services, run:

docker-compose down

πŸ“œ License

This project is open-source under the MIT License.


Would you like any modifications or additions? πŸš€πŸ˜Š

About

This repository provides a Traefik + Nginx Reverse Proxy setup to manage and secure web traffic. It utilizes Traefik v2.5 πŸ›‘οΈ for routing and Let's Encrypt SSL πŸ” for automatic HTTPS certificates. Additionally, Nginx 🌐 serves as a secondary reverse proxy to forward requests efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published