Document Root for admin side
zmoddynamics opened this issue · comments
Hello, I am not clear what the entry script path should be for the admin side ? For example,
the entry script for the application is under /public according to your documentation. Therefore, in apache for the frontend side I set DocumentRoot to point to ../public . This works fine.
Assuming admin_url is admin.example.com what is the proper DocumentRoot setting in httpd.conf to reference the backend application in your directory structure?
Backend is separated to another repository: yii2-vue-admin.
$ git clone https://github.com/razonyang/yii2-vue-admin.git
$ cd yii2-vue-admin
$ npm install
And then modify the VUE_APP_BASE_API
variable located in .env.development
, .env.production
and .env.staging
.
Finally, start up admin service or build admin application.
- Local development:
npm run dev
. - Build in production mode:
npm build:prod
, generated files are saved todist/prod
. - Build in staging mode:
npm build:stage
, generated files are saved todist/staging
.
The DocumentRoot
is the path that point to dist/prod
or dist/staging
.
You probably need to set up apache rewrite rule for vue router, see https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations.
Backend documentation can be found at https://panjiachen.github.io/vue-element-admin-site/.