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;
}

猜你喜欢

转载自www.cnblogs.com/dtdxrk/p/12713395.html
今日推荐