zoukankan      html  css  js  c++  java
  • *配置

    nginx

    server {
        listen       80;
        server_name  localhost;
    
        root  /apps/web/;
        index index.html;
    
    
        location / {
        }
    
        location /server {
           proxy_pass http://192.168.10.73:8080/manager-webapp/;
           proxy_cookie_path /manager-webapp/  /server/;
        }
    
        location /client  {
           proxy_pass http://192.168.10.23:8080/api-webapp/;
           proxy_cookie_path /api-webapp/  /client/;
        }
    }

      多服务器应用接口配置。其中proxy_cookie_path用于设置cookie有效性访问URI的转换,从nginx1.1.15开始支持。

    Apache

    <VirtualHost *:8084>
        DocumentRoot "D:codeweb"
        ProxyPreserveHost On
        #ProxyPass /server/ http://localhost:12306/
        #ProxyPassReverse /server/ http://localhost:12306/
    
        ProxyPass /server/ http://192.168.20.112:8080/
        ProxyPassReverse /server/ http://192.168.20.112:8080/
        #上传应用配置
        ProxyPass /client/  http://192.168.10.23:8080/api-webapp/
        ProxyPassReverse /client/  http://192.168.10.23:8080/api-webapp/
        ProxyPassReverseCookiePath /manager-webapp /
    </VirtualHost>

            其中,ProxyPassReverseCookiePath用于转换cookie的uri。否则可能造成服务器无法访问到session。

  • 相关阅读:
    Linux常用命令
    Linux常用命令
    Linux常用命令
    Linux 三剑客
    Python思维导图(二)—— 数据类型
    Python思维导图(一)—— 基础
    testNg
    Linux安装Git
    本地Git绑定Github仓库
    TCP协议与UDP协议
  • 原文地址:https://www.cnblogs.com/javawer/p/3701714.html
Copyright © 2011-2022 走看看