1.403返回页面

  1. #user nobody;
  2. worker_processes ;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. #pid logs/nginx.pid;
  7. events {
  8. worker_connections ;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. # fastcgi_intercept_errors on;
  14. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  15. # '$status $body_bytes_sent "$http_referer" '
  16. # '"$http_user_agent" "$http_x_forwarded_for"';
  17. #access_log logs/access.log main;
  18. sendfile on;
  19. #tcp_nopush on;
  20. #keepalive_timeout ;
  21. keepalive_timeout ;
  22. gzip on;
  23. gzip_min_length 1k;
  24. gzip_buffers 16k;
  25. gzip_comp_level ;
  26. gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
  27. gzip_vary off;
  28. upstream app {
  29. server 172.17.128.17: weight=;
  30. }
  31. proxy_cache_path proxy_cache levels=: keys_zone=page_cache:512m inactive=3d max_size=80g use_temp_path=off;
  32. proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
  33. client_max_body_size 500m;
  34. client_body_buffer_size 1024k;
  35. client_header_timeout 3m;
  36. client_body_timeout 3m;
  37. send_timeout 3m;
  38. proxy_connect_timeout 300s;
  39. proxy_read_timeout 300s;
  40. proxy_send_timeout 300s;
  41. proxy_buffer_size 128k;#设置代理服务器(nginx)保存用户头信息的缓冲区大小
  42. proxy_buffers 128k;
  43. proxy_busy_buffers_size 128k; #高负荷下缓冲大小(proxy_buffers*)
  44. proxy_temp_file_write_size 256k;
  45. proxy_ignore_client_abort on;
  46. server {
  47. listen ;
  48. server_name localhost;
  49. charset utf-;
  50. #access_log logs/host.access.log main;
  51. location /qysb {
  52. proxy_redirect off;
  53. proxy_set_header Host $host;
  54. proxy_set_header X-Real-IP $remote_addr;
  55. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  56. proxy_pass http://app;
  57. }
  58. location / {
  59. proxy_redirect off;
  60. proxy_set_header Host $host;
  61. proxy_set_header X-Real-IP $remote_addr;
  62. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  63. #proxy_pass http://app;
  64. root html;
  65. }
  66. #error_page /.html;
  67. # redirect server error pages to the static page /50x.html
  68. proxy_intercept_errors on;
  69. error_page /a.html;
  70. location = /a.html {
  71. root /opt/qysb-mgr/webapps/qysb-mgr/jsp/wap/tips;
  72. }
  73. # proxy the PHP scripts to Apache listening on 127.0.0.1:
  74. #
  75. #location ~ \.php$ {
  76. # proxy_pass http://127.0.0.1;
  77. #}
  78. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
  79. #
  80. #location ~ \.php$ {
  81. # root html;
  82. # fastcgi_pass 127.0.0.1:;
  83. # fastcgi_index index.php;
  84. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  85. # include fastcgi_params;
  86. #}
  87. # deny access to .htaccess files, if Apache's document root
  88. # concurs with nginx's one
  89. #
  90. #location ~ /\.ht {
  91. # deny all;
  92. #}
  93. }
  94. # another virtual host using mix of IP-, name-, and port-based configuration
  95. #
  96. #server {
  97. # listen ;
  98. # listen somename:;
  99. # server_name somename alias another.alias;
  100. # location / {
  101. # root html;
  102. # index index.html index.htm;
  103. # }
  104. #}
  105. # HTTPS server
  106. #
  107. #server {
  108. # listen ssl;
  109. # server_name localhost;
  110. # ssl_certificate cert.pem;
  111. # ssl_certificate_key cert.key;
  112. # ssl_session_cache shared:SSL:1m;
  113. # ssl_session_timeout 5m;
  114. # ssl_ciphers HIGH:!aNULL:!MD5;
  115. # ssl_prefer_server_ciphers on;
  116. # location / {
  117. # root html;
  118. # index index.html index.htm;
  119. # }
  120. #}
  121. }

自定义Nginx返回页面的更多相关文章

  1. Nginx优化_自定义报错页面

    自定义返回给客户端的404错误页面 1. 优化前,客户端使用浏览器访问不存在的页面,会提示404文件未找到 client]# firefox http://192.168.4.5/xxxxx      ...

  2. nginx 自定义代理返回 404

    在nginx的http段,加上一面的配置 proxy_intercept_errors on;//自定义代理返回的404错误提示

  3. 在ASP.NET MVC3项目中,自定义404错误页面

    在Web开发中,用户体验是至关重要的,一个友好的网站自然少不了自定义404错误页面. 让笔者为大家介绍404错误页面在ASP.NET MVC3项目中的配置: 第一步,在项目的Web.config文件中 ...

  4. react-router(v4) 路由跳转后返回页面顶部问题

    遇到的问题 由A页面跳转到B页面,B页面停留在A页面的位置,没有返回到顶部. 问题分析 首先分析下出现此问题的原因: 在项目中使用的是 hashHistory,它是建立在 history 之上的,当路 ...

  5. nginx 返回数据不完整

    当nginx 代理解析大量数据流时,会把数据先放在自己的缓冲区,然后一并发给客户端 一次请求的数据量很大, 则会有一部分数据会被忽略掉 前端解析数据会有问题 致使页面白屏 nginx 返回数据不完整的 ...

  6. iOS彩票项目--第五天,新特性引导页的封装、返回按钮的自定义、导航控制器的滑动返回以及自定义滑动返回功能

    一.上次实现了在AppDelegate中通过判断app版本决定是否进入新特性页面,今天将AppDelegate中的一坨进行了封装.将self.window的根控制器到底应该为新特性界面,还是主页面,封 ...

  7. zabbix监控nginx status页面

    在需要添加监控的nginx配置文件中添加下列配置 #zabbix监控nginx配置 location /nginx_status { stub_status on; access_log off; a ...

  8. axios增加自定义headers,页面上出现,服务端收不到

    问题 axios增加自定义headers,页面上出现,服务端收不到 原因 vue-cli起的服务是用node-http-proxy中间件处理的 默认是只有几个常用的header,自定义header是直 ...

  9. 支付宝通知页面notify_url、返回页面return_url

     返回页面(return_url文件)工作原理 即:商户系统请求/支付宝响应交互模式 1. 构造请求数据 商户通过提供的接口代码示例,通过代码示例的规则,程序构造与运算得到sign加密结果以及构造后的 ...

随机推荐

  1. 在ServletFilter层返回多字段提示给前端

    0.背景:在由于不想在小项目中引入SpringSecurity这种重量级安全框架,我自定义了一个LoginFilter来处理认证+授权逻辑.对于认证或授权失败的情况,最初是在filter中抛出异常,并 ...

  2. 得心应用的Vue高级技巧---vue中文社区

    1,require.context()一个webpack的api,通过执行require.context函数获取一个特定的上下文,主要用来实现自动化导入模块,在前端工程中,如果遇到从一个文件夹引入很多 ...

  3. 有关鼠标在页面body获取点击事件的问题

    首先说到这个问题我们先来谈谈body的高度问题,关于body高度的设置. 有些小伙伴可能就会说这个是多么的简单,直接进行如下操作不就可以了 body{ height:100%; } 这个设置虽然是想法 ...

  4. 简单说说常用的css选择器

    这里先来一段HTML代码 <div id="div" class="div"> <p class="div_P1"> ...

  5. Win10多用户同时登陆远程桌面

    想记录一下最近解决的一些问题,发现还是博客最合适,虽然之前从来没写过,希望以后能养成这个好习惯. 家里有一台台式机装着Win10,还有一台macbook,平时遇到需要用Win系统又不想坐在书桌前时,我 ...

  6. Bash脚本编程学习笔记07:循环结构体

    本篇中涉及到算术运算,使用了$[]这种我未在官方手册中见到的用法,但是确实可用的,在此前的博文<Bash脚本编程学习笔记03:算术运算>中我有说明不要使用,不过自己忘记了.大家还是尽量使用 ...

  7. FIB表与RIB表的区别与联系

    RIB (route information base) 和 FIB (forwarding information base),又称Ip路由表 和 CEF表,它们之间的关系可以用下面这张图片来高度概 ...

  8. 离线部署ArcGIS Runtime for Android100.5.0

    环境 系统:window 7 JDK:1.8.0_151 Maven:3.6.1 Android Studio:2.3 ArcGIS Runtime SDK for Android:100.5.0 1 ...

  9. 使用JAVA导出EXCEL表格(POI)

    一.POI概述 Jakarta POI 是一套用于访问微软格式文档的Java API.POI提供API给Java程序对Microsoft Office格式档案读和写的功能.在许多企业办公系统中,经常会 ...

  10. Spark调优指南

    Spark相关问题 Spark比MR快的原因? 1) Spark的计算结果可以放入内存,支持基于内存的迭代,MR不支持. 2) Spark有DAG有向无环图,可以实现pipeline的计算模式. 3) ...