Nginx下proxy_set_header 模块代码
发布:smiling 来源: PHP粉丝网 添加日期:2015-04-21 10:31:37 浏览: 评论:0
下文给各位重点介绍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; --phpfensi.com
- 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.phpfensi.com;
- sub_filter_once off;
- }
- }
备注:需要--with-http_sub_module模块支持.
Tags: Nginx模块 proxy_set_header
推荐文章
热门文章
最新评论文章
- 写给考虑创业的年轻程序员(10)
- PHP新手上路(一)(7)
- 惹恼程序员的十件事(5)
- PHP邮件发送例子,已测试成功(5)
- 致初学者:PHP比ASP优秀的七个理由(4)
- PHP会被淘汰吗?(4)
- PHP新手上路(四)(4)
- 如何去学习PHP?(2)
- 简单入门级php分页代码(2)
- php中邮箱email 电话等格式的验证(2)