1.403返回页面

#user  nobody;
worker_processes ;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections ;
}
http {
include mime.types;
default_type application/octet-stream;
# fastcgi_intercept_errors on;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout ;
keepalive_timeout ;
gzip on;
gzip_min_length 1k;
gzip_buffers 16k;
gzip_comp_level ;
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;
gzip_vary off;
upstream app {
server 172.17.128.17: weight=;
}
proxy_cache_path proxy_cache levels=: keys_zone=page_cache:512m inactive=3d max_size=80g use_temp_path=off;
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
client_max_body_size 500m;
client_body_buffer_size 1024k;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
proxy_connect_timeout 300s;
proxy_read_timeout 300s;
proxy_send_timeout 300s;
proxy_buffer_size 128k;#设置代理服务器(nginx)保存用户头信息的缓冲区大小
proxy_buffers 128k;
proxy_busy_buffers_size 128k; #高负荷下缓冲大小(proxy_buffers*)
proxy_temp_file_write_size 256k;
proxy_ignore_client_abort on;
server {
listen ;
server_name localhost;
charset utf-;
#access_log logs/host.access.log main;
location /qysb {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://app;
}
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_pass http://app;
root html;
}
#error_page /.html;
# redirect server error pages to the static page /50x.html
proxy_intercept_errors on;
error_page /a.html;
location = /a.html {
root /opt/qysb-mgr/webapps/qysb-mgr/jsp/wap/tips;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen ;
# listen somename:;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}

自定义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. 并发编程之J.U.C的第二篇

    并发编程之J.U.C的第二篇 3.2 StampedLock 4. Semaphore Semaphore原理 5. CountdownLatch 6. CyclicBarrier 7.线程安全集合类 ...

  2. cf1280B

    题意:给出一个n*m的矩阵,矩阵中的元素要么P要么是A 每次可以选择一个的子矩形,然后将矩阵中每一行都变为第一行,或者将矩阵中每一列都变为第一列 要求用最少的次数将矩阵中所有元素都变成A 题解:分类讨 ...

  3. 从表单驱动到模型驱动,解读低代码开发平台的发展趋势 ZT

    原文地址:https://www.grapecity.com.cn/blogs/read-the-trends-of-low-code-development-platforms 随着社会数字化进程的 ...

  4. XSS跨站测试代码

    '><script>alert(document.cookie)</script>='><script>alert(document.cookie)&l ...

  5. JS中0.1+0.2!=0.3

    在控制台输入0.1+0.2,会得出以下结果 即不等于0.3.下面我们说一下原因. 一.存储原理 1.在计算机中数字无论是定点数还是浮点数都是以多位二进制的方式进行存储的.2.在JS中数字采用的IEEE ...

  6. Git 的 .gitignore 配置说明 (C#)

    1.配置语法: 以斜杠“/”开头表示目录: 以星号“*”通配多个字符: 以问号“?”通配单个字符 以方括号“[]”包含单个字符的匹配列表: 以叹号“!”表示不忽略(跟踪)匹配到的文件或目录: 此外,g ...

  7. OptaPlanner 7.32.0.Final版本彩蛋 - SolverManager之异步求解

    因为工作和其它原因,很长一段时间没有出新的.关于OptaPlanner的文章了,但工余时间并没有停止对该引擎的学习.与此同时Geoffrey大神带领的KIE项目团队并没有闲下来,尽管在工业可用性.易用 ...

  8. php环境配置 wampserver 数据库无法连接

    开始接触php编程,最初级的选择了wampserver+phpstorm+notepad++.值得注意的有一下几点. 1.使用跳过不输入数据库密码登录数据库之后请及时修改数据库密码以及相关文件.否则在 ...

  9. PTA 学生成绩链表处理(C语言)

    本题要求实现两个函数,一个将输入的学生成绩组织成单向链表:另一个将成绩低于某分数线的学生结点从链表中删除. 函数接口定义: struct stud_node *createlist(); struct ...

  10. 数据库中查出来的时间多8小时&查询数据正常展示少8小时

    将serverTimezone的配置改为Asia/Shanghaiurl: jdbc:mysql://127.0.0.1:3306/bfc?useUnicode=true&characterE ...