下面这个第一个location是把http://localhost:1337/gek/转给node处理
那下面第二个location是干吗的,是处理后端传过来的接口吗?
不太明白!!!
server {
listen 80;
server_name gek.show.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://localhost:1337/gek/;
}
location ~ ^/okc/rest{
proxy_store off;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
proxy_set_header Host "gek.show.com";
#proxy_pass http://gek.show.com;
proxy_pass http://gek.show.com:8080;
}
}
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
闭关修行中......