Nginx下proxy_set_header 模块代码
2019/10/10/17:46:39 阅读:1891 来源:谷歌SEO算法 标签:
SEO博客
下文给各位重点介绍Nginx下proxy_set_header 模块代码,要了解的朋友不防进入看看吧.前言:由于新注册的腾讯企业邮箱已经无法绑定域名(之前绑定的依然可以使用),因此采用nginx模块来强制转向.代码:
- server{
- listen80;
- server_namemail.t4x.org;
- rewrite^/(.*)$https://mail.t4x.org/$1permanent;
- location/{
- root/site/t4x.org/mail;
- indexindex.htmlindex.htm;
- }
- error_page500502503504/50x.html;
- location=/50x.html{
- root/site/t4x.org/mail;
- }
- }
- server{
- listen443sslspdy;
- server_namemail.t4x.org;
- sslon;
- ssl_certificatemail.t4x.org_bundle.crt;
- ssl_certificate_keymail.t4x.org.key;
- ssl_session_cacheshared:SSL:1m;
- ssl_protocolsSSLv2SSLv3TLSv1;
- ssl_ciphersALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;--phpfensi.com
- ssl_prefer_server_cipherson;
- location/
- {
- proxy_set_headerAccept-Encodingxxxx;
- proxy_set_headerHostmail.t4x.org;
- proxy_passhttps://exmail.qq.com;
- sub_filterhttp://mail.t4xhttps://www.phpfensi.com;
- sub_filter_onceoff;
- }
- }
备注:需要--with-http_sub_module模块支持.
热门评论