nginx配置

location /api/ {
proxy_pass http://backend;
}
and you visit http://abc.xyz/api/endpoint, you would be directed to http://backend/api/endpoint;

if the config is

location /api/ {
proxy_pass http://backend/;
}
and you visit http://abc.xyz/api/endpoint, you would be directed to http://backend/endpoint.

That’s the difference.

相关推荐

  1. nginx配置

    2024-04-01 01:04:02       42 阅读
  2. nginx配置

    2024-04-01 01:04:02       16 阅读
  3. nginx配置

    2024-04-01 01:04:02       7 阅读
  4. NGINX相关配置

    2024-04-01 01:04:02       34 阅读
  5. Nginx的stream配置

    2024-04-01 01:04:02       39 阅读
  6. nginx配置端口转发

    2024-04-01 01:04:02       44 阅读
  7. Nginx conf文件配置

    2024-04-01 01:04:02       31 阅读
  8. Nginx基本配置内容

    2024-04-01 01:04:02       41 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-01 01:04:02       19 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-01 01:04:02       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-01 01:04:02       20 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-01 01:04:02       20 阅读

热门阅读

  1. nginx如何清理页面缓存

    2024-04-01 01:04:02       14 阅读
  2. Linux进程的基本概念

    2024-04-01 01:04:02       15 阅读
  3. VPP添加接口IP地址

    2024-04-01 01:04:02       14 阅读
  4. Activity入门1

    2024-04-01 01:04:02       11 阅读
  5. 【c++20】CPP-20-STL-Cookbook 学习笔记

    2024-04-01 01:04:02       20 阅读
  6. Leetcode 3100. Water Bottles II

    2024-04-01 01:04:02       16 阅读
  7. 什么是数据仓库

    2024-04-01 01:04:02       17 阅读
  8. 随机规划:求解报童问题期望值模型的算法方案

    2024-04-01 01:04:02       16 阅读