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

Original: https://www.cnblogs.com/dtdxrk/p/12713395.html
Author: dtdxrk
Title: react nginx配置

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/543873/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球