05/02/2023, 5:20 PM
How do I run Prefect behind nginx? I have: And I need Prefect to rewrite the URL such that all assets (e.g. css, javascript, etc.) are rewritten with the
prefix. Otherwise users will get a blank page when visiting /prefect, because the assets won’t be pointing to the right location. Does anyone have any experience with that? Should I set
env var? How should the Dockerfile for the agent change?

Christopher Boyd

05/15/2023, 8:10 PM
Hi Ofir, Are you trying to run Prefect cloud behind nginx as a proxy or?
Are you running Prefect server (OSS) and trying to front it with nginx?
That said, I think this is what you are looking for : Essentially you would want to rewrite whatever traffic is coming in on, to where you want it to go with the rewrite rule e.g. you can rewrite traffic from
, or the other way around (redirect traffic from
route to