DAS_2024_1/morozov_vladimir_lab_3/nginx.conf

39 lines
1.1 KiB
Nginx Configuration File
Raw Normal View History

2024-11-12 22:23:55 +04:00
events {
worker_connections 1024;
}
http
{
server {
listen 8080;
listen [::]:8080;
server_name localhost;
location /artists/ {
proxy_pass http://artists_srv:8001/artists/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /artists/docs {
proxy_pass http://artists_srv:8001/docs;
proxy_set_header Host $host;
}
location /paints/docs {
proxy_pass http://paints_srv:8002/docs;
proxy_set_header Host $host;
}
location /paints/ {
proxy_pass http://paints_srv:8002/paints/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}