Let me start from middle. I have been play around for a long time with these three part:
- nginx which handles the path
- Fastapi server
- sqlAdmin
The url https://example.com/gem/admin must be passed to sqlAdmin but there is this agonizing contrast.
If nginx configs like:
location /gem/admin/ { proxy_pass http://172.18.0.18:80/;
and sqlAdmin like:
admin = Admin( application, engine, authentication_backend=authentication_backend, base_url="/admin", title="Gem Admin Panel" )
request will not be passed to sqlAdmin and be served by FastApi like
{"detail":"Not Found"}
If I remove base_url then the styles url would be wrong like (missing admin):
https://example.com/gem/statics/css/fontawesome.min.css
If I remove trailing slash from nginx location and proxypass then it will add another admin to url resulting to 404 error.
it is frustrainting really. Please help me out.