ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

nginx 根据不同域名跳转

2020-08-19 10:31:30  阅读:44  来源: 互联网

标签:set http header 0.1 pass nginx 域名 proxy 跳转


  location / {
                  proxy_set_header X-Real-IP $remote_addr;
                  proxy_set_header X-Forwarded-For $remote_addr;
                  proxy_set_header Host $http_host;
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                # proxy_pass http://127.0.0.1:1024;
                 if ($http_host = "movie.skdapp.cn") {
                      proxy_pass http://127.0.0.1:1024;
                 }
       }

 

标签:set,http,header,0.1,pass,nginx,域名,proxy,跳转
来源: https://www.cnblogs.com/light-zhang/p/13527815.html

专注分享技术,共同学习,共同进步。侵权联系[admin#icode9.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有