nginx反向代理

来源:互联网 发布:萧然网络问政 编辑:程序博客网 时间:2024/06/11 16:19
nginx反向代理:
1、portal:
domainList:"apsWeb" : "/apsWeb/", //整合nginx及接入层
login.html:  var accessUrl = "/apsWeb";
          var portalUrl = "/apsWeb";
          文件路径修改 <link rel="stylesheet" href="/modules/login/css/style.css">
          
2、nginx:
nginx.conf:解压缩地址修改
创建需要设置反向代理的文件内容:D:\nginx_mars-1.9.9\conf\vhosts\asp.conf
 location / {
   root   "D:\newsvn\hsxt-portal\hsxt-portal-aps-web\src\main\webapp";
            index  index.html index.htm;
        }
        
      location  /apsWeb {
   proxy_pass http://192.168.41.33:8080/hsxt-access-web-aps;
   
   location  /apsPortal {
   proxy_pass http://192.168.41.33:8081/hsxt-portal-aps-web;
   
3、启动nginx      


4、访问地址:http://127.0.0.1:21000/modules/login/tpl/login.html
0 0
原创粉丝点击