Giter VIP home page Giter VIP logo

Comments (7)

Jakob37 avatar Jakob37 commented on July 29, 2024 1

Might be a matter of proxy path --> https://fastapi.tiangolo.com/advanced/behind-a-proxy/#check-the-docs-ui ?

Aha, I see! OK then I will continue looking into it. Thanks!

from chanjo2.

Jakob37 avatar Jakob37 commented on July 29, 2024 1

Closing this as a non-Chanjo2 issue

from chanjo2.

northwestwitch avatar northwestwitch commented on July 29, 2024

Can you see any specific error in the container running chanjo2?

from chanjo2.

Jakob37 avatar Jakob37 commented on July 29, 2024

Hmm, nothing in the Chanjo2 container (same as when going to an invalid path).

In NGINX:

nginx_proxy           | 10.140.214.144 - - [17/Apr/2024:12:39:33 +0000] "GET /chanjo2/docs HTTP/1.1" 200 939 "-" "..." "-"
nginx_proxy           | 10.140.214.144 - - [17/Apr/2024:12:39:34 +0000] "GET /openapi.json HTTP/1.1" 404 207 "http://cmdscout2.lund.skane.se/chanjo2/docs" "..." "-"

from chanjo2.

northwestwitch avatar northwestwitch commented on July 29, 2024

What's your NGINX configuration?

from chanjo2.

Jakob37 avatar Jakob37 commented on July 29, 2024

nginx.conf

user  nginx;  # user that will own the server
worker_processes  2;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}

stream {
    server {
        listen  27017;
        proxy_connect_timeout 2s;
        proxy_timeout 10m;
        proxy_pass    stream_mongo_backend;
    }

    upstream stream_mongo_backend {
      server mongodb:27017;
  }
}

http {
    include       /etc/nginx/mime.types;
    default_type  text/html;

    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  5m;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

Relevant parts of scout_stack.conf

# Scout proxy
server {
    listen 80;
    listen [::]:80;

    charset utf-8;

    root /www/;
    index index.html;

    proxy_read_timeout 600;
    proxy_connect_timeout 600;
    proxy_send_timeout 600;

    location / {
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect off;

        proxy_pass http://scout:5000/;
    }

    location /cmd/ {
        alias /www/;
    }

   ...

 location /chanjo2/ {
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect off;

        proxy_pass http://chanjo2:8000/;
    }

from chanjo2.

northwestwitch avatar northwestwitch commented on July 29, 2024

Might be a matter of proxy path --> https://fastapi.tiangolo.com/advanced/behind-a-proxy/#check-the-docs-ui ?

from chanjo2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.