Nginx 配置记录

 

#呼吸慢病患者端
server {
  listen 80;
  server_name patient.yuemiaotech.com;
  location / {
    root D:/Website/Wicrecloud/chronic/patient;
    try_files $uri $uri/ /index.html;
    index index.html index.htm;
  }
  location ^~ /api/ {
    add_header Access-Control-Allow-Origin *;
    rewrite /api/(.+)$ /$1 break;
    proxy_pass http://127.0.0.1:9001;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

#呼吸慢病管理后台
server {
  listen 80;
  server_name chronicadmin.yuemiaotech.com;
  location / {
  proxy_pass http://8.129.78.222:9003;
  }
}
server {
  listen 80;
  server_name www.yuemiaotech.com yuemiaotech.com;
  location / {
    root D:/Website/YueMiao/Official/;
    index index.html;
  }
}

 

posted on 2023-03-17 14:35  dysjwang  阅读(8)  评论(0编辑  收藏  举报

导航