server{
listen 8080;
location / {
root /opt/iot/community/public/;
index index.html;
}
location /callComponent {
proxy_pass http://127.0.0.1:8012;
}
}
监听8080端口,默认首页为public目录下index.html
登陆等接口,通过proxy_pass转发至8012;