• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

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