• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

paths in scripts need global change

H

hypercog

Guest
I appear to have succesfully migrated from 7.x to 8.1. (such a great concept)
Well enough, anyway.

One big problem remains:
ALL SCRIPTS ARE BROKEN
I know this is because I need to change all instances of "/home/httpd/vhosts" to "/var/www/vhosts" in EVERY php, perl, cgi, etc., SCRIPT in all of my domains.

Question for Linux expert:
Is there a shell command/script, or some trick of redirection that will either find/replace the string in all of the hundreds of files it occurs in, or fool the existing script to point at the correct directory?

Thanx
 
There's two things you could do to resolve this issue:

1) Create the directory /home/httpd/vhosts and then edit the file /etc/psa/psa.conf replacing 'HTTPD_VHOSTS_D /var/www/vhosts' with 'HTTPD_VHOSTS_D /home/httpd/vhosts'; or
2) Download rpl from http://www.laffeycomputer.com/rpl.html and run the command 'rpl -R "/var/www/vhosts" "/home/httpd/vhosts" /home/httpd/vhosts', which will search through every file and replace any instances of '/home/httpd/vhosts' with '/var/www/vhosts'
 
Back
Top