完整的参考下面这段
user root; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/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 /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; #include /etc/nginx/conf.d/*.conf; upstream gateway { server blade-api; } server { listen 2888; server_name web; root /usr/share/nginx/html; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable "MSIE [1-6]\."; location /{ index index.html; error_page 404 /index.html; } location ~ ^/(api/)?actuator { return 403; } location ^~ /oauth/redirect { try_files $uri /index.html; } location ^~ /api/ { 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_buffering off; rewrite ^/api/(.*)$ /$1 break; proxy_pass http://gateway/; } } }
讨论(0)
- 热议问题
-
/blade-auth/oauth/token 获取token接口报请求头中未找到 [Authorization] 信息
1
-
树形的模型搜索有bug
1
-
BladeX-Tool 的JDK8版本的版本有吗?目前只看到17的版本
1
-
前端Saber3升级无法启动
2
-
bladex的登陆验证码如何配置清晰度?
1
-
物联网平台(cloud版)blade-emqx部署后出现拒绝连接:未经授权
1
-
物联系统升级集成企业系统
1
-
物联系统运行报运行错误
2
-
表格树updateKeyChildren,是否可用,怎么没有demo
1
-
mqqt数据绑定方式,无法加载数据
2
扫一扫访问 Blade技术社区 移动端