#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#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 0;
keepalive_timeout 65;
#gzip on;
fastcgi_intercept_errors on;
upstream boot {
server 127.0.0.1:8001;
server 127.0.0.1:8002;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
location /bootTest/{
ssi on;
ssi_silent_errors on;
proxy_read_timeout 300;
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://boot;
}
error_page 400 401 402 403 404 /40x.html;
location = /40x.html {
proxy_pass http://127.0.0.1:8001/bootTest/errorNginxTest;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
proxy_pass http://127.0.0.1:8001/errorTest;
}
}
}
利用Nginx负载均衡的访问SpringBoot服务,还有如何利用Nginx实现404,500等错误页面的拦截
原创lzqcode ©著作权
文章标签 springboot 文章分类 Java 后端开发
-
Nginx安全配置
nginx版本号隐藏
nginx 版本号 安全 -
nginx 配置 File not found 错误 404
·
nginx php html apache 百度网盘 -
NGINX 配置404错误页面转向
什么是404页面如果碰巧网站出了问题,或者用户试图访问一个并不存在的
nginx 自定义 html 404错误 php -
jquery怎么在href链接里带参数
在a标签里添加data-ajax="false"或rel="external"属性例:<a data-ajax="false" href="http://www.***.com/help/***.zip">点击下载</a>详解: 外部页面链接JQuery Mobile 主动化了创建ajax站点和法度的过程.默认景象下,当你点击一个链接时会指向
jquery怎么在href链接里带参数 python javascript ViewUI ajax