DAS_2024_1/bondarenko_max_lab_3/nginx.conf

31 lines
685 B
Nginx Configuration File
Raw Normal View History

2024-11-25 02:10:37 +04:00
events {
worker_connections 1024;
}
http {
upstream authors_service {
server authors:3000;
}
upstream books_service {
server books:3001;
}
server {
listen 80;
location /authors {
proxy_pass http://authors_service;
2024-11-25 02:23:32 +04:00
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
2024-11-25 02:10:37 +04:00
}
location /books {
proxy_pass http://books_service;
2024-11-25 02:23:32 +04:00
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
2024-11-25 02:10:37 +04:00
}
}
}