如何在apache2中部署antd-admin仪表板?

问题描述 投票:0回答:1

我正在apache2而不是nginx中部署ant-admin仪表板。如何为antd-admin仪表板配置apache2?回购:https://github.com/zuiidea/antd-admin

npm run build
// Generated build files under /dist


在apache2文档root / Library / Web中复制粘贴

cp -r /dist Library/WebServer/Documents/

试图打电话给http://localhost/dist

页面未加载当我检查控制台时。 css,js文件来自http://localhost/umi.css,但期待它应该来自http://localhost/dist/umi.css

如何在apache2中提供css,js和sub目录/ dist?

apache2 antd
1个回答
0
投票

在package.json中使用主页键

“主页”:“。/ dist”

https://facebook.github.io/create-react-app/docs/deployment#step-1-add-homepage-to-packagejson

© www.soinside.com 2019 - 2024. All rights reserved.