nginx react项目配置

server {
    listen 9104;
    #server_name abcdfund.modeling.ai;
    #access_log logs/abcdfund.modeling_access.log main;
    #error_log logs/abcdfund.modeling_error.log info;
    #return 301 https://$server_name$request_uri;

    location / {
        root /local/www/news.modeling/build;
        proxy_set_header Host  $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
        try_files $uri $uri/ /index.html;
        index index.html;
    }

}

 

你可能感兴趣的:(nginx react项目配置)