nginx配置为:
server {
listen 80;
server_name 127.0.0.1;
location / {
root /var/www/project/dist;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ^~/api/ { proxy_pass http://127.0.0.1:5438/api/; }
}
dist文件是
dist/
âââ [1.1K] favicon.ico
âââ [ 901] index.html
âââ [441K] static
âââ [229K] css
â âââ [189K] app.0134d2dda560ad06a1485c5f69858798.css
â âââ [ 36K] app.0134d2dda560ad06a1485c5f69858798.css.gz
âââ [ 15K] fonts
â âââ [ 11K] element-icons.6f0a763.ttf
âââ [193K] js
âââ [ 53K] app.ce2c95e6433bd8164fc4.js
âââ [ 18K] app.ce2c95e6433bd8164fc4.js.gz
âââ [ 799] manifest.2ae2e69a05c33dfc65f8.js
âââ [ 88K] vendor.78ce98b3a34633bdf003.js
âââ [ 29K] vendor.78ce98b3a34633bdf003.js.gz