Skip to content
Snippets Groups Projects
nginx.conf 518 B
Newer Older
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log debug;

events {
    worker_connections  1024;
}

http {
  server {
    listen 80;
    location / {
      # React routes are entirely on the App side in the web broswer
      # Always proxy to root with the same page request when nginx 404s
      error_page 404 /;
      proxy_intercept_errors on;
      proxy_set_header Host $host;
      proxy_pass http://frontend:3000/;
    }
    location /api {
      proxy_pass http://backend/api;
    }
  }
}