-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
19 lines (17 loc) · 1.09 KB
/
Copy pathnginx.conf
File metadata and controls
19 lines (17 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
server {
listen 80;
# Обработка запросов к статическим файлам
location / {
root /usr/share/nginx/html; # Папка, куда копируются статические файлы Angular
index index.html; # Основной файл, который будет загружен
try_files $uri $uri/ /index.html; # Попробуй найти файл, если не найден, отдай index.html
}
# Проксирование API запросов к API Gateway
location /api/ {
proxy_pass http://localhost:8222; # Проксируем запросы на контейнер API Gateway
proxy_set_header Host $host; # Передаем оригинальный заголовок Host
proxy_set_header X-Real-IP $remote_addr; # Передаем IP клиента
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Передаем информацию о прокси
proxy_set_header X-Forwarded-Proto $scheme; # Передаем протокол (HTTP/HTTPS)
}
}