• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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