nginx.conf,内容如下
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name localhost;
location / {
index index.html index.htm;
}
location /api {
proxy_pass http://192.168.0.217:9555;
}
}
}
这个配置会将http://localhost:80/api的请求转发到http://192.168.0.217:9555