nginx 配置代理
正向代理(代理的客户端)
server {
list 80;
server_name www.qq.com;
location / {
proxy_pass http://$http_host$request_uri;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /sur/share/nginx/html;
}
}
反向代理(代理的服务器)
server {
location ~ ^/api {
proxy_pass http://localhost:3000;
}
}
