nginx
c1990331
phper
展开
-
nginx 转发
前后分离模式减少域名寻址时间,直接走静态html文件的域名请求,服务器做转发 location /api/ { proxy_pass http://api.domain.com; # http://api.domain.com/api/ } location /api/ { proxy_pass http://api.domain.com/;http://api.domain.com/ } hosts 127.0.0.1 api.domain.com原创 2022-03-24 20:25:18 · 3680 阅读 · 0 评论 -
反向代理配置(当前请求代理到源服务器)
location /v1/web/no/anchorList { # [2] proxy_http_version 1.1; proxy_pass http://test.vip:8080/v1/web/no/anchorList; # [3] add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods POST; add_header Access-Con原创 2021-07-23 09:58:47 · 186 阅读 · 0 评论