# asliddintuxtasinov/nginx-reverse-proxy-example architecture

> Architecture diagram of the GitHub repository asliddintuxtasinov/nginx-reverse-proxy-example, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/asliddintuxtasinov/nginx-reverse-proxy-example
- Repository: https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example

## Overview

This repository is a Dockerized Nginx reverse proxy. Requests enter Nginx and are routed by hostname to an API or either frontend; the default host is rejected. The README also documents HTTPS, API admin-IP restrictions, CORS, and mounted static/media paths. No source excerpts were provided, so relationships below are limited to mappings explicitly described in the README.

Main entry points: [`nginx/nginx.conf`](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/nginx.conf) (Nginx proxy), [`nginx/conf.d/api.conf`](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/api.conf) (API routing), [`nginx/conf.d/example-front1.conf`](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/example-front1.conf) (Frontend one), [`nginx/conf.d/example-front2.conf`](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/example-front2.conf) (Frontend two)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_clients(("HTTP clients"))
node_nginx["Nginx proxy<br/>[nginx.conf]"]
node_default["Default host<br/>[00-default.conf]"]
node_api["API routing<br/>[api.conf]"]
node_front1["Frontend one"]
node_front2["Frontend two"]
node_backend["Backend service"]
node_service1["Frontend service one"]
node_service2["Frontend service two"]
node_static_media["Static and media files<br/>[docker-compose.yml]"]

node_clients -->|"send requests"| node_nginx
node_nginx -->|"reject unknown hosts"| node_default
node_nginx -->|"route API host"| node_api
node_nginx -->|"route frontend host"| node_front1
node_nginx -->|"route frontend host"| node_front2
node_api -->|"proxy requests"| node_backend
node_front1 -->|"proxy requests"| node_service1
node_front2 -->|"proxy requests"| node_service2
node_nginx -->|"serve mounted files"| node_static_media

click node_nginx "https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/nginx.conf"
click node_default "https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/00-default.conf"
click node_api "https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/api.conf"
click node_front1 "https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/example-front1.conf"
click node_front2 "https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/example-front2.conf"
click node_static_media "https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/docker-compose.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_clients,node_front1,node_front2,node_service1,node_service2 toneBlue
class node_nginx,node_default,node_static_media toneTeal
class node_api toneMint
class node_backend toneIndigo
```

## Components

### Other components

- **HTTP clients**
- [Nginx proxy](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/nginx.conf): `nginx/nginx.conf`
- [Default host](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/00-default.conf): `nginx/conf.d/00-default.conf`
- [API routing](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/api.conf): `nginx/conf.d/api.conf`
- [Frontend one](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/example-front1.conf): `nginx/conf.d/example-front1.conf`
- [Frontend two](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/nginx/conf.d/example-front2.conf): `nginx/conf.d/example-front2.conf`
- **Backend service**
- **Frontend service one**
- **Frontend service two**
- [Static and media files](https://github.com/asliddintuxtasinov/nginx-reverse-proxy-example/blob/master/docker-compose.yml): `docker-compose.yml`

## Connections

- HTTP clients → Nginx proxy: send requests (evidence: `README.md`)
- Nginx proxy → Default host: reject unknown hosts (evidence: `README.md`)
- Nginx proxy → API routing: route API host (evidence: `README.md`)
- Nginx proxy → Frontend one: route frontend host (evidence: `README.md`)
- Nginx proxy → Frontend two: route frontend host (evidence: `README.md`)
- API routing → Backend service: proxy requests (evidence: `README.md`)
- Frontend one → Frontend service one: proxy requests (evidence: `README.md`)
- Frontend two → Frontend service two: proxy requests (evidence: `README.md`)
- Nginx proxy → Static and media files: serve mounted files (evidence: `README.md`)
