Nginx下proxy_set_header 模块代码

小浪SEO博客 专注SEO优化思维、SEO技术的实战分享类博客~

下文给各位重点介绍Nginx下proxy_set_header 模块代码,要了解的朋友不防进入看看吧.前言:由于新注册的腾讯企业邮箱已经无法绑定域名(之前绑定的依然可以使用),因此采用nginx模块来强制转向.代码:

  1. server{
  2. listen80;
  3. server_namemail.t4x.org;
  4. rewrite^/(.*)$https://mail.t4x.org/$1permanent;
  5. location/{
  6. root/site/t4x.org/mail;
  7. indexindex.htmlindex.htm;
  8. }
  9. error_page500502503504/50x.html;
  10. location=/50x.html{
  11. root/site/t4x.org/mail;
  12. }
  13. }
  14. server{
  15. listen443sslspdy;
  16. server_namemail.t4x.org;
  17. sslon;
  18. ssl_certificatemail.t4x.org_bundle.crt;
  19. ssl_certificate_keymail.t4x.org.key;
  20. ssl_session_cacheshared:SSL:1m;
  21. ssl_protocolsSSLv2SSLv3TLSv1;
  22. ssl_ciphersALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;--phpfensi.com
  23. ssl_prefer_server_cipherson;
  24. location/
  25. {
  26. proxy_set_headerAccept-Encodingxxxx;
  27. proxy_set_headerHostmail.t4x.org;
  28. proxy_passhttps://exmail.qq.com;
  29. sub_filterhttp://mail.t4xhttps://www.phpfensi.com;
  30. sub_filter_onceoff;
  31. }
  32. }

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

相关广告
  • Nginx下proxy_set_header 模块代码 Nginx下proxy_set_header 模块代码 Nginx下proxy_set_header 模块代码
相关阅读

Nginx下proxy_set_header 模块代码

2019/10/10 17:46:39 | 谷歌SEO算法 | SEO博客