nginx.conf 696 B

123456789101112131415161718192021222324
  1. server {
  2. listen 80;
  3. server_name localhost; # your domain here
  4. client_max_body_size 128M; # maximum upload size
  5. root /app/html;
  6. index index.html;
  7. location / {
  8. # First attempt to serve request as file, then
  9. # as directory, then fall back to displaying a 404.
  10. index index.html;
  11. try_files $uri $uri/ /index.html;
  12. }
  13. location /api/ {
  14. proxy_set_header Host $host;
  15. proxy_set_header X-Real_IP $remote_addr;
  16. proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
  17. proxy_http_version 1.1;
  18. proxy_set_header Upgrade $http_upgrade;
  19. proxy_set_header Connection upgrade;
  20. proxy_pass http://127.0.0.1:9100/;
  21. }
  22. }