react nginx配置

react

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;

}

以上是 react nginx配置 的全部内容, 来源链接: utcz.com/z/382563.html

回到顶部