ianleggett / TinanceUI

0 stars 0 forks source link

Deploy to Nginx is not properly #33

Closed meditations closed 3 years ago

meditations commented 3 years ago

Current deployment to Nginx is not properly, so can't refresh the page accordingly.

laozhu commented 3 years ago

My example of static react site with api proxy.

server {
  listen 443 ssl http2;
  server_name example.com;
  include conf.d/basic_ssl.conf;
  include conf.d/example_ssl.conf;
  # access_log /var/log/nginx/example.com.log main;
  root /root/www/example.com;
  index index.html;

  location / {
    try_files $uri $uri/ /index.html;
    log_not_found off;
  }

  location /api/ {
    proxy_set_header Origin "";
    proxy_pass http://127.0.0.1:8000;
    include conf.d/headers.conf;
    include conf.d/basic_proxy.conf;
  }
}