Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
489 views
in Technique[技术] by (71.8m points)

spring boot - Experiencing "GET /webjars/springfox-swagger-ui/favicon-16x16.png?v=2.9.2 HTTP/1.1" 404 in NGINX

Please assist I'm having issue accessing my springboot swagger-ui.html (But I can access /v2/api-docs) in NGINX, and I got this from access.log ("GET /webjars/springfox-swagger-ui/favicon-16x16.png?v=2.9.2 HTTP/1.1" 404 in NGINX) when accessing from browser. But the error.log is not showing any error. Below is my .conf file. I have checked through all existing issues and solutions on stackoverflow but non is addressing my issue. The springboot application are run as jar files on centos8.

server {
    if ($host = www.domain.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot


if ($host = domain.com) {
    return 301 https://$host$request_uri;
} # managed by Certbot


    listen       80;
    listen       [::]:80;
    index index.html index.htm index.nginx-debian.html;

    server_name  www.domain.com developer.domain.com domain.com;
    return 404; # managed by Certbot
}

server {
server_name  www.domain.com developer.domain.com domain.com;
    
#access_log  domainlog/host.access.log  main;

location / {
        index index.html index.htm index.nginx-debian.html;


        proxy_pass http://ipaddress:8008/v2/api-docs
        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_set_header   X-Forwarded-Proto $scheme;
    }

location /rec-service {
        proxy_pass http://ipaddress:8008/swagger-ui.html;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
}


location /proc-service {
        proxy_pass http://ipaddress:8009/swagger-ui.html;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
}


location /transX-service {
        proxy_pass http://ipaddress:8010/swagger-ui.html;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
}


location /client-service {
        proxy_pass http://ipaddress:8011/swagger-ui.html;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
}


location /xTransfer-Service {
        proxy_pass http://ipaddress:8012/swagger-ui.html;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Port $server_port;
}

    error_page  404              /404.html;

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # manage`enter code here`d by Certbot
}
question from:https://stackoverflow.com/questions/65626475/experiencing-get-webjars-springfox-swagger-ui-favicon-16x16-pngv-2-9-2-http-1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...