如何配置HTTPS代理解析

 

问:<?xml version=\”1.0\” encoding=\”UTF-8\”?>

<configuration>    <system.webServer>        <rewrite>            <rules><rule name=\”WWW Redirect0\”><match url=\”^(.*)\” /><conditions><add input=\”{HTTP_HOST}\” pattern=\”^www.xxx.com$\” /></conditions><action type=\”Rewrite\” url=\”http://127.0.0.1:8888/{R:0}\” redirectType=\”Permanent\” /></rule>            </rules>        </rewrite>    </system.webServer></configuration>
我想购买一个内网主机,在我公司测试这种代码能实现HTTP代理,要实现HTTPS代理,web.config如何配置用https://www.xxx.com
访问https://127.0.0.1:8888/
,如何配置HTTPS代理解析

答:您好,

1.从您的描述来看请问是否是指的访问www.xxx.com 然后去获取到http://127.0.0.1:8888/ 的数据?如果是,那么这个是反向代理,但是得确保服务器内可以正常请求127.0.0.1,反向代理您可以网上搜索“nginx配置反向代理”2.如果您不是这个意思,请详细说明下业务需求,最终想实现什么样的效果,非常感谢您长期对我司的支持!

问:是反向代理,我目前是IIS,在我公司测试这种代码能实现HTTP代理,要实现HTTPS代理,web.config如何配置,网上搜索没找到资料

答:您好,抱歉iis反向代理不太了解,您上面规则是301重定向跳转到http://127.0.0.1:8888/,您可以用以下规则试下能否实现,反向代理建议您网上搜索“nginx配置反向代理”通过nginx配置,非常感谢您长期对我司的支持!

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<configuration>
 <system.webServer>
        <rewrite>
            <rules>
               <rule name=\"301\" stopProcessing=\"true\">
                    <match url=\"^(.*)$\" ignoreCase=\"false\" />
                    <conditions logicalGrouping=\"MatchAll\">                       
                       <add input=\"{HTTPS}\" pattern=\"^on$\" negate=\"true\" />
                    </conditions>
                    <action type=\"Redirect\" url=\"https://www.abc.com/{R:1}\" redirectType=\"Permanent\" />
               </rule>
            </rules>
        </rewrite>
    </system.webServer> 
</configuration>

 

更多关于云服务器域名注册虚拟主机的问题,请访问西部数码官网:www.west.cn
赞(0)
声明:本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-62778877-8306;邮箱:fanjiao@west.cn。本站原创内容未经允许不得转载,或转载时需注明出处:西部数码知识库 » 如何配置HTTPS代理解析

登录

找回密码

注册