How to deploy vue with the same domain name in tp5
skye
skye 2021-01-14 10:40:24
0
3
1690

How to deploy vue with the same domain name in the tp5 framework without affecting the access of the background admin. The entry file is in the root directory of the project, put the dist folder directly into the root directory, and then let the entry file index/index/index redirect /index.html. Is this possible?

skye
skye

reply all(3)
曾师傅

This is how I deployed it. When packaging vue, you can set the output file name and folder. Put the packaged html file in the location corresponding to the view folder in thinkphp, and put the two packaged js and css files. Just go to the set path.

灭绝师太

It is recommended to deploy separately for easy maintenance in the future. You can package vue and put it in a subdomain name, and then use nginx reverse proxy to solve cross-domain issues~

招财猫

It is recommended to use nginx to divert traffic

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template