http redirect to https:

        if ($http_cf_visitor ~ '"scheme":"http"'){
rewrite ^/(.*)$ https://$http_host$ last;
}
proxy_pass http://scholar.google.com;
proxy_set_header Host scholar.google.com;

when 403 404 error then query node_app:

    location / {
root /www/www.site.com/public_html;
index index.html; location ~ /$ {
error_page = @node_app;
} location = /index.html {
expires 5m;
}
}

node_app:

    location @node_app {
proxy_pass http://127.0.0.1:;
proxy_set_header Host $http_host;
}

动态反向代理:

resolver 223.5.5.5;

    location ~ /(\w+)(.*)$ {
proxy_pass http://m.$1.domain.com$2?$args;
proxy_set_header Host m.$.domain.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header User-Agent $http_user_agent;
sub_filter \"/ \"http://$http_host/$1/;
#sub_filter \"http://m.$1.domain.com/ \"http://$http_host/$1/;
sub_filter_once off;
}

编译nginx常用配置选项:

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic

最新文章

  1. sizzle分析记录:分解流程
  2. AngularJs之Scope作用域
  3. Aptana插件安装方法
  4. js设置自动刷新
  5. 【iOS】环形渐变进度条实现
  6. 计时器(Chronometer)的使用
  7. javascript基础学习(十四)
  8. LinuxC安装gcc
  9. [置顶] location.href你真的会用了?
  10. WebLogic 安装
  11. 面试必问!Java 多线程中两个线程交替执行,一个输出偶数,一个输出奇数
  12. HAOI2019+十二省联考 游记
  13. 基础才是重中之重~delegate里的Invoke和BeginInvoke
  14. springboot 静态注入 单例
  15. HDU 1384 Intervals【差分约束-SPFA】
  16. FTPService工具类
  17. JavaSE基础知识(4)—数组的应用
  18. HTML第五章总结
  19. <项目管理的决策力>总结梳理
  20. shiro的简单入门使用

热门文章

  1. 在Angular1.X中使用CSS Modules
  2. List的FindIndex和ForEach
  3. Beta版本冲刺——day4
  4. [2014.01.27]wfGifAnimator 动画GIF组件 3.0
  5. VR内容定制请找北京动软VR团队,长年承接VR/AR应用、游戏内容定制
  6. Python入门3
  7. HackerRank "Jumping on the Clouds"
  8. 一款好用且免费的语句分析工具Plan Explorer
  9. Hadoop总结篇之一------开篇
  10. 图片Exif 信息中Orientation的理解和对此的处理