Nginx reverse proxy on unix socket for uvicorn not working
问题 Files : # main.py: from fastapi import FastAPI app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} - # nginx.conf: events { worker_connections 128; } http{ server { listen 0.0.0.0:8080; location / { include uwsgi_params; uwsgi_pass unix:/tmp/uvi.sock; } } } - # Dockerfile FROM python:3 COPY main.py . RUN apt-get -y update && apt-get install -y htop tmux vim nginx RUN pip install fastapi uvicorn COPY nginx.conf /etc/nginx/ Setup : docker build -t nginx-uvicorn:latest .