百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>服务器> Nginx下proxy_set_header 模块代码
分享文章到:

Nginx下proxy_set_header 模块代码

发布时间:01/15 来源: 浏览: 关键词:
下文给各位重点介绍Nginx下proxy_set_header 模块代码,脚面要了解的朋友不防进入看看吧.

前言:由于新注册的腾讯企业邮箱已经无法绑定域名(之前绑定的依然可以使用),因此采用nginx模块来强制转向!

代码:

    server {
listen       80;
server_name  mail.t4x.org;
rewrite ^/(.*)$ https://mail.t4x.org/$1 permanent;
location / {
    root   /site/t4x.org/mail;
    index  index.html index.htm;
}
error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   /site/t4x.org/mail;
}
}

server {
listen       443 ssl spdy;
server_name  mail.t4x.org;
ssl on;
ssl_certificate mail.t4x.org_bundle.crt;
ssl_certificate_key mail.t4x.org.key;
ssl_session_cache    shared:SSL:1m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
location /
{
proxy_set_header Accept-Encoding xxxx;
proxy_set_header Host mail.t4x.org;
proxy_pass https://exmail.qq.com;
sub_filter http://mail.t4x https://www.111cn.net;
sub_filter_once off;
}
}

备注:需要--with-http_sub_module模块支持!

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有5人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板