location /api { proxy_pass http://localhost:8080; rewrite ^/api/(.*) /$1 break; } } 我还使用docker-compose并用它配置nginx: nginx-server: image: nginx:stable-alpine container_name: nginx ports: - "80:80" volumes: - ./nginx/nginx.conf.prod:/etc/nginx/conf.d/nginx.conf command: s...