Notes on Migration of Old Projects

  apache, linux, nginx, php

After receiving a friend’s help, he now faces a difficult problem.

Even for the newly-recruited company, the project does not have GIT, and the old version of TP,CI, code is also very messy, and the catalog is also very many. some of the missing items are stored on the server, and nearly 30G of the user’s avatar is stored on the server, which is a word “messy”

I am going to rearrange the company’s projects, servers and architecture, which are too messy to be arranged. next, please look at my performance ~

Backup

Since there is no git, then there is no need to use git, just pack it online and download it via ftp link. In case of no clue, I suggest to reinstall it directly. . If you are not sure, it is suggested not to die.

General business structure of the company

  • New interface application
  • background application
  • Old interface application

After careful exploration, only the avatar of the resource file exists locally, and the rest is stored on the seven cows. This will make packing easy. The normal use of users will not be affected.

Download the project locally after packaging.

Aliyun is used in the database, so it is ignored directly.

This process took five hours. . . There are indeed many things.

Configuration

The company uses Apache, finds vhost files, copies one to the local, and sorts out all configuration files, directories, etc.
His company requires Nginx, so I need to sort out the configuration files one by one, then find the ssl for nginx certificate, and everything is ready.

Sensorless forwarding

I own a 4-core 4g ariyun ECS, and their company’s volume is not large, so I plan to deploy the project to my server first, load balance on the company’s server, increase our IP weight, and introduce all user traffic to our server.

Demo is as follows:

ProxyPass / balancer://proxy/
 <Proxy balancer://proxy>
 BalancerMember http://192.168.6.37:6888/  loadfactor=3
 BalancerMember http://192.168.6.38:6888/  loadfactor=1
 </Proxy>

After forwarding the user traffic, start resetting the enemy server and prepare for redeployment.