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

Unable to serve chainlit frontend on a subpage #908

Open
kshitijagrwl opened this issue Apr 15, 2024 · 0 comments
Open

Unable to serve chainlit frontend on a subpage #908

kshitijagrwl opened this issue Apr 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kshitijagrwl
Copy link

Describe the bug

I'm trying to serve chainlit frontend on a remote server where I am already running a few apps.
On opening /chainlit in the browser, the request is received by the server(running in debug) but the browser shows 404 not found for the .js and .css files

I want to serve the frontend on /chainlit and here is my nginx config for that:

server {
  server_name your-domain.com;

  location /my-app/ {
    proxy_pass http://localhost:8080/;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}

I'm running the app using -
chainlit run app.py

I believe this is due to some static routing in the react front end. What's the best way to handle this?

Server config:
chainlit - 1.0.502
flask - 0.110.1
python - 3.10

@kshitijagrwl kshitijagrwl added the bug Something isn't working label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant