zoukankan      html  css  js  c++  java
  • apache转发规则 + nginx location 正则匹配经典案例

    0.apache的proxypass浏览器url不会变

    我们想要的效果是请求http://qwyimg.haha.com.cn/......直接返回结果,而不是请求http://qwyimg.haha.com.cn/......返回一个地址,在通过这个返回的地址在去请求拿到结果

    ProxyPass "/qiqiao/storage/oss/files/" "http://10.0.2.11:8000/qiqiao/runtime/api/v1/storage/oss/files/"
    ProxyPassReverse "/qiqiao/storage/oss/files/" "http://10.0.2.11:8000/qiqiao/runtime/api/v1/storage/oss/files/"

    server_name qy.haha.com.cn 0.0.0.0 qwyimg.haha.com.cn;
    nginx的location
    ProxyPass /qiqiao/storage/oss/files https://qy.haha.com.cn/qiqiao/runtime/api/qiqiao/storage/oss/files/storage/oss/files/
    ProxyPassReverse /qiqiao/storage/oss/files https://qy.haha.com.cn/qiqiao/runtime/api/qiqiao/storage/oss/files/storage/oss/files/


    1.apache转发规则

    运维侧修改管理后台与个人网页版的apache配置实现以下跳转:
    
    /qwy/manager/login.jsp 修改为https://qy.haha.com.cn/qwy/login
    
    /qwy/manager/loginweb.jsp 修改为https://qy.haha.com.cn/qwy/login
    
    /web/manager/login.jsp 修改为https://qy.haha.com.cn/web/login
    
    /web/manager/loginweb.jsp 修改为https://qy.haha.com.cn/web/login
    
    RewriteEngine On

    RewriteCond
    %{REQUEST_URI} ^/qwy/manager/login.*.jsp
    RewriteRule .* https://qy.haha.com.cn/qwy/login

    RewriteCond %{REQUEST_URI} ^/web/manager/login.*.jsp
    RewriteRule .* https://qy.haha.com.cn/web/login
  • 相关阅读:
    软工实践寒假作业(1/2)
    java判断是否为数字
    前端测试工具Cypress
    StringBuffer&StringBuilder
    IO流
    kafka简介
    Python学习笔记10--unittest参数化
    python学习笔记9--日志模块logging
    Python学习笔记9-多线程和多进程
    python学习笔记9-单元测试unittest
  • 原文地址:https://www.cnblogs.com/hixiaowei/p/12176659.html
Copyright © 2011-2022 走看看