# 把 dist/ 的内容上传到此目录,再按实际域名、路径与 HTTPS 证书修改配置。 server { listen 80; server_name portal.example.com; root /var/www/dieya-product-ai-center; index index.html; location / { try_files $uri $uri/ =404; } # .mjs 必须使用 JavaScript MIME 类型。 location ~ \.mjs$ { types { application/javascript mjs; } add_header Cache-Control "no-cache"; } location = /index.html { add_header Cache-Control "no-cache"; } }