• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

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