aboutsummaryrefslogtreecommitdiff
path: root/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf24
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