Nginx反向代理配置
反向代理的基本配置
http {
include mine.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
location /api {
proxy_pass http://localhost:8080;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
}
}
}