DAS_2024_1/klyushenkova_ksenia_lab_3/nginx.conf
2024-12-20 10:20:16 +04:00

49 lines
1.7 KiB
Nginx Configuration File

events { worker_connections 1024; }
http {
server {
listen 80;
listen [::]:80;
server_name localhost;
location /director_service/ {
proxy_pass http://director_service:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /movie_service/ {
proxy_pass http://movie_service:8081/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /director_service/docs {
proxy_pass http://director_service:8080/docs;
}
location /movie_service/docs {
proxy_pass http://movie_service:8081/docs;
}
location /director_service/openapi.json {
proxy_pass http://director_service:8080/openapi.json;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /movie_service/openapi.json {
proxy_pass http://movie_service:8081/openapi.json;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
}