记录一次项目中用到的nginx做请求转发的功能
修改nginx配置文件
server {
listen 9001;
server_name localhost;
location ~/serviceedu/ {
proxy_pass http://localhost:8001;
}
location ~/eduoss/ {
proxy_pass http://localhost:8002;
}
location ~/eduvod/ {
proxy_pass http://localhost:8003;
}
location ~/educms/ {
proxy_pass http://localhost:8004;
}
location ~/edumsm/ {
proxy_pass http://localhost:8005;
}
location ~/educenter/ {
proxy_pass http://localhost:8150;
}
}