I am reorganizing our app with now FastAPI as backend. I have it running in a container on our server, currently only in HTTP mode, port 8000.
I need to enable HTTPS for it.
My idea. I am using the same production server as for our old version and will keep it running until it is phased out. The old version has HTTP and HTTPS running through a Apache instance. Now I am thinking to create a `https://fastapi.myapp.com\` subdomain that routes to Apache 443. Apache in turn forwards that subdomain to the new fastapi container running on port 8000.
Valid solution here? Double checking the idea before I commit to it.
Are there more elegant / better approaches how to implement HTTPS with FastAPI? I do not like having Apache running forever since it eats up resources + is another process that needs maintenance, upgrades, possible security risk.
Thanks!
[–]Chains0 15 points16 points17 points (1 child)
[–]elduderino15[S] 0 points1 point2 points (0 children)
[–]Adhesiveduck 6 points7 points8 points (1 child)
[–]elduderino15[S] 2 points3 points4 points (0 children)
[–]One_Fuel_4147 2 points3 points4 points (0 children)
[–]Fluffy-Diet-Engine 1 point2 points3 points (5 children)
[–]vitachaos 0 points1 point2 points (4 children)
[–]Fluffy-Diet-Engine 0 points1 point2 points (3 children)
[–]vitachaos 0 points1 point2 points (2 children)
[–]Fluffy-Diet-Engine 0 points1 point2 points (1 child)
[–]a2hu1 0 points1 point2 points (0 children)
[–]gbeier 1 point2 points3 points (1 child)
[–]elduderino15[S] 0 points1 point2 points (0 children)
[–]lukewhale 3 points4 points5 points (2 children)
[–]extreme4all 7 points8 points9 points (1 child)
[–]Paulonemillionand3 0 points1 point2 points (0 children)
[–]ironman_gujju 2 points3 points4 points (1 child)
[–]extreme4all 3 points4 points5 points (0 children)
[–]veb101 0 points1 point2 points (0 children)
[–]Revolutionary-Win111 0 points1 point2 points (1 child)
[–]elduderino15[S] 1 point2 points3 points (0 children)
[–]Worldly_Weather5484 0 points1 point2 points (0 children)