search

Home  >  Q&A  >  body text

How to deploy vue with the same domain name in tp5

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?

skyeskye1399 days ago1682

reply all(3)I'll reply

  • 曾师傅

    曾师傅2021-01-20 01:47:02

    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.

    reply
    0
  • 灭绝师太

    灭绝师太2021-01-18 09:23:06

    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~

    reply
    0
  • 招财猫

    招财猫2021-01-14 15:31:15

    It is recommended to use nginx to divert traffic

    reply
    0
  • Cancelreply