前期准备 nginx
一.nginx设置代码
listen 8085;
server_name localhost;#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
if ($request_filename ~* .*\.(?:htm|html)$)
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
if ($request_filename ~* .*\.(?:js|css)$)
{
expires -1;
}
}location /hospital {
proxy_pass http://127.0.0.1:2009/api;
}
二.开放端口