nginx 302 301 设置 url 转跳 nginx 资源重定向 nginx tcp 转发

简介: nginx 转发

#---ssl 301 转跳 ---#  

if ($server_port = 80){

         rewrite ^(/2.php)$ http://www.eisc.cn$1 permanent;

      }

#--- 目录301 转跳 ---#

设置 301 转跳,

location /ccb/ {

   return 301 http://work.eisc.cn;

   proxy_pass http://eisc.cn/cs;

   index  index.html index.htm;

}



# 设置 302 重定向

location /ccb/ {

   rewrite /ccb/activity(.*)$ https://www.baidu.com break;

   proxy_pass http://192.168.118.14/;

   index  index.html index.htm;

}


#----------------------------   nginx 转发 反向代理 -----------------------------#

# nginx 子站点tcp转发


server{

listen 80 ;

listen 443;


server_name kbash.cn www.kbash.cn;


location / {

    proxy_pass http://82.157.148.144:80;

    index index.php index.html;

 }

}



#---------------------------------------------------------------------#

目录
相关文章
|
3月前
|
测试技术
Cypress如何设置全局URL?
Cypress如何设置全局URL?
|
5月前
|
负载均衡 网络协议 算法
Nginx系列教程(13) - TCP反向代理实现
Nginx系列教程(13) - TCP反向代理实现
400 0
|
6月前
|
网络协议 应用服务中间件 nginx
nginx配置tcp协议代理的日志
nginx配置tcp协议代理的日志
145 0
|
8月前
|
应用服务中间件 nginx
Nginx rewrite(URL)地址重定向
Nginx rewrite(URL)地址重定向
312 0
|
9月前
|
前端开发 应用服务中间件 API
Nginx 反向代理 去除 路径匹配规则url
Nginx 反向代理 去除 路径匹配规则url
|
3月前
|
负载均衡 网络协议 小程序
Nginx配置Tcp负载均衡
Nginx配置Tcp负载均衡
|
3月前
|
网络协议 关系型数据库 MySQL
【nginx】使用nginx转发tcp请求
【nginx】使用nginx转发tcp请求
106 1
宜搭详情页面URL设置
宜搭自定义详情页跳转问题
宜搭详情页面URL设置
|
7月前
|
机器人 SEO
SAP 电商云 Spartacus UI 根据 url 设置 site context 的具体例子
SAP 电商云 Spartacus UI 根据 url 设置 site context 的具体例子
54 0
|
8月前
|
安全 应用服务中间件 Apache