nginx swagger问题解决

spring boot整合swagger打包之后使用nginx代理出错无法使用解决。错误为:"no content" and Response Code 0 或者 使用spring security,公开访问的资源出现403

可尝试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
upstream tomcat {
server localhost:8080;
}

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html/dist;

location / {
proxy_pass http://tomcat/;
proxy_set_header Host $host; #指定host
}
# ...
}

您的支持将鼓励我继续创作!