How to change the 307 response code to 301? VPS on CentOS7

Good day to all!
Before moving to the VPS, the site was on a free hosting. On it all redirects were 301.
After moving from free hosting to the VPS, all 301 redirects changed to 307.
What needs to be configured on the server for 307 redirects to become 301?

I’m afraid that is impossible to answer without knowing which webserver you use, and how the redirects are configured. And if the redirect responses are created by a web application you’ll likely have to look for the answer inside its code.

What’s your CMS ? Depends on it