有时候我们需要一个nginx转发多个静态页面的时候往往都不知道怎么配置,今天就在这里展示下记录
后台管理页面 1
server {
listen 19003;
location / {
root /home/html/huliMangage;
index index.html;
}
location /api/ {
proxy_pass http://IP:port;
}
}
后台管理页面 2
server {
listen 19004;
location / {
root /home/html/kanghuMangage;
index index.html;
}
location /api/ {
proxy_pass http://IP:port;
}
}