Search code examples
pythoncpanelpassengerfastapi

Is there a way to deploy a fastapi app on cpanel?


I'm having trouble deploying a FastAPI app on cpanel with Passenger


Solution

  • You might be able to run your FastAPI app using a2wsgi:

    In your passenger_wsgi.py:

    from a2wsgi import ASGIMiddleware
    from main import app  # Import your FastAPI app.
    
    application = ASGIMiddleware(app)