-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to handle app mounts #2
Comments
Since it works when you specify the port explicitly, I wonder if it is rather a problem with your proxy configuration? Is that possible? |
I guess it has to do with server configuration but I was inspired by yours. Below is my server config:
The app is running under port I admit that my server has other stuff going on including wordpress site at the root. Another weird thing I am facing is If I visit pdf file then I get nginx's 404 and If I try to visit png file I uploaded for testing then I get fastapi's 404 I just really don't know why I am unable to see files. Even I don't know what's the issue and where should I look for it. Regards. |
What do you mean by common port? Common between what?
That probably has to do with the default mimetypes configured on nginx. Could there be an issue with how the locations are defined in the nginx configuration? The order of definition matters for path matching. |
Sorry for being late. "Common Port" means usually app runs on 8000 if we don't specify a port for our app. Do you have any guide where I can learn nginx configuration? |
Sorry, I don't know of a tutorial that I can recommend. Many guides do exist, though. |
Hello,
Thanks so much for this repo. I learned a lot from your sample repo. I successfully deployed app to subpath and I am also able to view docs and
openapi.json
at desired subpath.The problem I am facing is I am unable to view media (user uploads) files. I mounted them using
app.mount()
With the above app configuration, I visit user-uploaded media files via domain
domain.com/my/sub/path/media/2021/9/logo.png
I don't see file. But I try using portdomain.com:8000/my/sub/path/media/2021/9/logo.png
I get to see the file.Do you know what's going on?
Thanks so much for sharing this repo. Without your custom worker solution, I don't know how much it will take to deploy the app.
Regards.
The text was updated successfully, but these errors were encountered: