完整的参考下面这段
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)
官方新品
- 热议问题
-
物联网平台支持本地存储吗,不用minio
1
-
bladx admin、gateway等项目起不来
1
-
解决sql注入问题导致gateway无法启动,报错java.io.FileNotFoundException:WebMvcConfigurer.class
1
-
一个用户绑定多角色,在登陆后获取其并集
1
-
mvn clean compile 编译 BladeX-Tool 提示 ... /ojdbc7-12.2.0.1.pom 401 Unauthorized
2
-
gateway无法启动,报错java.io.FileNotFoundException:WebMvcConfigurer.class
1
-
cookie中token缺失HttpOnly和Secure属性
1
-
在nacos配置多数据库之后sql日志不能正常打印了
1
-
无法本地调试服务
1
-
启动流程设计器工程flowable-design,表act_id_property用的是版本6.5.0.1,需要引入哪些依赖
1
扫一扫访问 Blade技术社区 移动端