nginx相关的一些记录

http redirect to https:

        if ($http_cf_visitor ~ '"scheme":"http"'){rewrite ^/(.*)$ https://$http_host$1 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 403 404 = @node_app;}location = /index.html {expires 5m;}}

node_app:

    location @node_app {proxy_pass   http://127.0.0.1:9000;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.$1.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

posted on 2014-10-22 15:20 黄尚 阅读(...) 评论(...) 编辑 收藏

转载于:https://www.cnblogs.com/afxcn/p/4043255.html

nginx相关的一些记录相关推荐

  1. php fpm 日志记录,如何解决nginx下php-fpm不记录php报错日志的问题

    如何解决nginx下php-fpm不记录php报错日志的问题 发布时间:2020-07-28 10:17:29 来源:亿速云 阅读:150 作者:Leah 本篇文章为大家展示了如何解决nginx下ph ...

  2. nginx php fpm 日志,nginx下php-fpm不记录php报错日志怎么办?

    解决nginx下php-fpm不记录php报错日志的办法:1.修改[php-fpm.conf]中配置,没有则增加:2.修改[php.ini]中配置,没有则增加:3.重启[php-fpm]即可. 解决n ...

  3. Nginx开启访问日志记录

    转载自 https://www.cnblogs.com/want990/p/11551440.html Nginx开启访问日志记录 vi /etc/nginx/nginx.conf 2.打开 log_ ...

  4. 关于3D空间旋转的相关内容的记录(Euler Angles, Gimbal Lock, Quaternion, iOS CMAttitude)

    概述 最近看了些旋转相关内容,记录一下自己的理解和总结.更详尽的内容可以查看参考资料里的文章,讲得很棒. 3D空间旋转的表示方法 可以使用不同的方式表示3D空间里的旋转. Euler Angles(欧 ...

  5. windows下Nginx相关命令

    windows下Nginx相关命令 windows下Nginx相关命令 查看Nginx的版本号 启动Nginx 快速停止或关闭Nginx 正常停止或关闭Nginx: 配置文件修改重装载命令: 查看所有 ...

  6. nginx(官方安装) Nginx相关文件 Nginx模块 location

    文章目录 案例 部署nfs+sersync 1.backup 2.nfs 下载nginx并安装 配置nginx小游戏页面 1.nginx 2.因为nginx无法处理动态请求,所以这里我们需要安装php ...

  7. git删除相关历史提交记录,相关文件保持当前状态

          git删除相关历史提交记录,相关文件保持当前状态 引言   新年新气象,趁着现在新的一年开始项目的事情还不是非常繁忙的时候,多整点下酒菜.这不实战类型的博客记录又开始了!当然实战类型的博客 ...

  8. 【前端知识】与时间标准(UTC、GMT、CST)和时间形式(ISO)相关的知识记录

    @Author:Outman @Date:2023-03-27 与时间标准相关的知识记录 1.UTC(调和世界时间/世界统一时间/世界标准时间) UTC指的是Coordinated Universal ...

  9. nginx的日志格式记录真实客户端IP

    Nginx中日志文件的格式在nginx.conf中定义,其默认格式如下: log_format  main  '$remote_addr - $remote_user [$time_local] &q ...

最新文章

  1. darknet53网络结构及配置文件对比
  2. ASP.NET JScript公共类(非常有用)
  3. 用户态与内核态的区别
  4. protobuf生成as文件
  5. 1031 查验身份证 (15分)_21行满分代码
  6. python dataframe 列赋值_dataframe根据新列特征的条件为其赋值,给
  7. vSphere 7简介:混合云的功能和技术
  8. Struts 1.x 的工作原理
  9. easyui datagrid在IE洌览器下reload不能刷新数据
  10. linux怎么进入mnt目录,「Linux基础知识」Linux路径的表示方式
  11. 系统集成项目管理工程师高频考点(第五章)
  12. 双网口设备 网关设置注意事项
  13. 奥西750服务器系统,奥西TDS750驱动
  14. scroll案例:带有动画的返回顶部
  15. [附源码]计算机毕业设计JAVA景区门票系统
  16. c语言中的百分数怎么求,如何计算具体百分比
  17. android手机为什么越用越卡
  18. 安卓(调试)有线投屏、wifi投屏到电脑笔记
  19. 小甲鱼Python学习笔记之魔法方法
  20. html怎么加深字体颜色,我打印网页的字的颜色非常浅,怎样才能加深? – 手机爱问...

热门文章

  1. oracle照片字节大小值,Oracle每条记录的平均字节数
  2. python小乌龟行走轨迹_旋转傻乌龟——几何变换实践|python爬虫|python入门|python教程...
  3. mysql 分区指定路径_[数据库]MySQL 指定各分区路径
  4. elment-ui 表格进行实时百分比计算
  5. matplotlib 散点图_Python学习 —— matplotlib绘制三维曲线图和三维散点图
  6. spring 数组中随机取几个_游戏编程中需要掌握哪些数学物理知识
  7. 浏览器ERR_PROXY_CONNECTION_FAILED解决方法
  8. 此任务要求应用程序具有提升的权限
  9. html禁止f12键代码,网站禁用f12 禁止调试代码方法
  10. arcgis 快速制图插件_51GIS学院|ArcGIS空间数据分析系列课程的27个视频