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.
β
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.
- Manages HTTP(S) traffic.
- Automatically generates SSL certificates via Let's Encrypt.
- Routes requests to services based on domain names.
- Serves as an additional proxy layer.
- Configurable via
nginx.conf
. - Routes requests to
https://damarsalaka.com
.
git clone https://github.com/yourusername/proxy-traefik-nginx.git
cd proxy-traefik-nginx
Make sure your nginx.conf
file exists in the project directory and is properly configured.
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.
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"
Update the nginx.conf
file to customize the proxy behavior.
traefik-nginx-proxy/
βββ letsencrypt/ # Stores SSL certificates
βββ nginx.conf # Nginx configuration
βββ docker-compose.yml # Docker Compose configuration
βββ README.md # Documentation
πΉ 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.
To stop and remove the services, run:
docker-compose down
This project is open-source under the MIT License.
Would you like any modifications or additions? ππ