diff --git a/backend/app.py b/backend/app.py index ccff46c..b1986f1 100644 --- a/backend/app.py +++ b/backend/app.py @@ -10,9 +10,7 @@ from config import Settings app = FastAPI(title="Translator", description="DHBW Cloud Computing II", version="1.0.0", - docs_url='/api/docs', - redoc_url='/api/redoc', - openapi_url='/api/openapi.json') + root_path='/api') @app.on_event("startup") async def start_database(): diff --git a/proxy/nginx.conf b/proxy/nginx.conf index 46f523d..1b6a39d 100644 --- a/proxy/nginx.conf +++ b/proxy/nginx.conf @@ -1,4 +1,3 @@ -# HTTPS server configuration server { listen 443 ssl; server_name translator.dhbw.flokaiser.com; @@ -8,7 +7,6 @@ server { ssl_trusted_certificate /etc/letsencrypt/live/test-name/chain.pem; location / { - # Forward requests to port 80 proxy_pass http://frontend:80/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -16,8 +14,7 @@ server { proxy_set_header X-Forwarded-Proto https; } - location /api { - # Forward requests to port 80 + location /api/ { proxy_pass http://backend:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -26,10 +23,9 @@ server { } } -# HTTP server configuration server { listen 80; server_name translator.dhbw.flokaiser.com; return 301 https://$server_name$request_uri; -} +} \ No newline at end of file