匿名
未登录
登录
Linux78|wiki
搜索
查看“Nginx 隐式跳转”的源代码
来自Linux78|wiki
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
Nginx 隐式跳转
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
wiki:用户|用户
您可以查看与复制此页面的源代码。
Nginx的隐式跳转可以实现将请求跳转到另一个网站的页面,并且浏览器中URL保持不变。以下配置示例将请求路径https://abc.com/home/test跳转到https://def.com/home/test/test.html页面。 server { listen 443; server_name abc.com; location = /home/test { rewrite /home/test /home/test/test.html break; proxy_pass https://def.com; } } 线上实际配置示例,将访问192.168.10.54:1054/v2/aliyun/secretRecording的请求跳转到10.160.2.100:8089/aliyun/secretRecording: 查看源码打印? server { listen 1054; server_name 192.168.10.54; index index.html index.php index.htm; location ~* ^/v2/aliyun/secretRecording { proxy_next_upstream error timeout http_503 http_504 http_502; proxy_connect_timeout 500s; proxy_read_timeout 500s; proxy_send_timeout 500s; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; rewrite ^(.*)$ /aliyun/secretRecording break; proxy_pass http://10.160.2.100:8089; } }
返回至
Nginx 隐式跳转
。
导航
导航
首页
最近更改
随机页面
栏目
Nginx
Kubernetes
Spring Cloud
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志