You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virtual-patient/docker/nginx/docs/conf.d/http.conf

65 lines
2.2 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

server {
listen 80;
listen [::]:80;
server_name localhost;
#access_log /var/log/nginx/host.access.log main;
client_max_body_size 20M; # 设置客户端请求的最大上传大小为 20MB可以根据实际情况修改
location / {
root /usr/share/nginx/html/dist;
index index.html index.htm;
# add_header Cache-Control no-store;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html/dist;
}
# 前台后端服务
location /virtual-patient/ {
proxy_pass http://web_servers/virtual-patient/;
proxy_set_header Host $http_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 /virtual-patient/fileManage/ {
proxy_pass http://manage_servers/virtual-patient-manage/fileManage/;
proxy_set_header Host $http_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 /virtual-patient-manage/ {
proxy_pass http://manage_servers/virtual-patient-manage/;
proxy_set_header Host $http_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;
}
# rasa 服务
location /virtual-patient-rasa/ {
proxy_pass http://rasa_servers/virtual-patient-rasa/;
proxy_set_header Host $http_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 /virtual-patient-graph/ {
proxy_pass http://graph_servers/virtual-patient-graph/;
proxy_set_header Host $http_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;
}
}