react nginx配置

server {
        listen 8080;
        # server_name your.domain.com;
 
        root /home/root/react-demo/dist;
        index index.html index.htm;
 
        location / {
                try_files $uri $uri/ /index.html;
        }
        location ^~ /assets/ {
                gzip_static on;
                expires max;
                add_header Cache-Control public;
        }
        error_page 500 502 503 504 /500.html;
        client_max_body_size 20M;
        keepalive_timeout 10;
}

 

posted @ 2020-04-16 15:51  dtdxrk  阅读(1851)  评论(0编辑  收藏  举报