Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 404 while accessing the Swagger UI #70

Open
al-alison opened this issue Feb 15, 2024 · 1 comment
Open

Error 404 while accessing the Swagger UI #70

al-alison opened this issue Feb 15, 2024 · 1 comment

Comments

@al-alison
Copy link

Hello,

I successfully started the Chainlens explorer, and all functions are working properly, except the API/Swagger page, is there some additional config to make it work?

I'm receiving an 404 error when accessing this page:

image
@lancez77
Copy link

lancez77 commented Aug 12, 2024

Hi,

I encountered the same issue as well.
Finally got it working using the following workaound

Edit nginx.conf in the directory /xxx/chainlens-free/docker-compose

events { }

http {
  server {
    listen 80;
    charset utf-8;

    location /api/ {
        proxy_pass http://api:8090/;
        proxy_redirect /swagger-ui/ /api/swagger-ui/;
    }

    location /v3/ {
        proxy_pass http://api:8090/v3/;
        proxy_redirect /v3/ /api/v3/;
    }

    location / {
      proxy_pass http://web:3000/;
    }

    error_page 500 502 503 504 /5xx.html;
    location /5xx.html {
      root /www/error_pages/;
    }
  }
}

After making the changes, restart the containers.

Hope this helps.

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants