nginx 部分跳转到本机处理

简介: server {listen 80;server_name test.net;root /data/nginx/html;location /{}}server {listen 443;server_name test.

server {
listen 80;
server_name test.net;
root /data/nginx/html;
location /{}
}
server {
listen 443;
server_name test.net;
ssl on;
ssl_certificate /etc/ssl/x.crt;
ssl_certificate_key /etc/ssl/x.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 20m;
location /iparking-ilife-customer {
if (request_uri ~ ^/iparking-ilife-customer/app/p/auth/appAuth ){ rewrite /iparking-ilife-customer/app/p/auth/appAuth /upcoming.html break; proxy_pass http://127.0.0.1; } proxy_pass http://otherip/iparking-ilife-customer; proxy_redirect default ; proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; proxy_set_header Hosthost;
proxy_set_header X-Real-IP $remote_addr;
}
}

目录
相关文章
|
10月前
|
安全 网络协议 应用服务中间件
Nginx配置http跳转https
Nginx配置http跳转https
287 0
|
Java 应用服务中间件 PHP
Nginx中的location匹配和rewrite重写跳转
1、常用的Nginx正则表达式 2、location 3、rewrite 4、rewrite实例
1441 0
Nginx中的location匹配和rewrite重写跳转
|
2月前
|
应用服务中间件 nginx
nginx配置访问qicaitun.com强制跳转www.qicaitun.com
nginx配置访问qicaitun.com强制跳转www.qicaitun.com
14 0
|
12月前
|
应用服务中间件 nginx
Nginx:proxy_pass和try_files 301跳转带了端口
Nginx:proxy_pass和try_files 301跳转带了端口
390 0
|
前端开发 应用服务中间件 nginx
Nginx的反向代理自动301跳转避坑
当Web服务器为Nginx时,若浏览器访问的uri最后不带斜杠,如www.xxx.com.cn/aaa,当aaa是一个目录时,会产生301跳转,且自动将uri补全为www.xxx.com.cn/aaa/,最后添加一个/。当前端存在Nginx反向代理时,就会存在一个坑。
1865 0
|
缓存 应用服务中间件 PHP
Nginx及rewrite跳转(二)
Nginx及rewrite跳转(二)
Nginx及rewrite跳转(二)
|
缓存 搜索推荐 应用服务中间件
|
安全 应用服务中间件 网络安全
Nginx配置Https并进行Http强制跳转Https
Nginx配置Https并进行Http强制跳转Https
Nginx配置Https并进行Http强制跳转Https
|
缓存 安全 搜索推荐
Nginx配置4种模式跳转到指定统一域名
Nginx配置4种模式跳转到指定统一域名
1101 0
|
应用服务中间件 nginx
Nginx系列:配置跳转的常用方式
随着应用服务的增多,服务可能部署在不同的服务器上。这些服务有可能存在IP、端口Port、请求的ContextPath等一样的情况,怎么合理的配置他们的跳转呢?下面介绍三种常见的跳转方式。
414 0