diff options
author | Parker <contact@pkrm.dev> | 2024-11-11 23:57:44 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-11-11 23:57:44 -0600 |
commit | 52127adb08cff9e6bf6bad0125c3b5f7e0d04db2 (patch) | |
tree | 9b2b8a793aed986a54603b8530af2a0f8ae4ca30 /nginx.conf | |
parent | 386e6dcb35c866d204e2d32fd814aa7ca3ed15ae (diff) |
Merge API+APP in Docker
Diffstat (limited to 'nginx.conf')
-rw-r--r-- | nginx.conf | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..c07ddcb --- /dev/null +++ b/nginx.conf @@ -0,0 +1,24 @@ +server { + listen 5000; + + # Serve React static files + location / { + root /usr/share/nginx/html; + try_files $uri $uri/ /index.html; + } + + # Proxy API requests to FastAPI + location /api/ { + proxy_pass http://localhost:5252; + set_real_ip_from 0.0.0.0/0; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + } + # Proxy short link requests to FastAPI + location /c/ { + proxy_pass http://localhost:5252; + set_real_ip_from 0.0.0.0/0; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + } +}
\ No newline at end of file |