• 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

Resolved Change Virtual Host Directory

Chad

Basic Pleskian
Hello,

Currently running CloudLinux 6.8 with Plesk Onyx and would like to change the virtual hosts directory. Have tried running the suggested method found here:

- https://kb.plesk.com/en/1186

Steps:
  1. wget http://kb.plesk.com/Attachments/kcs-12467/transvhosts.pl
  2. chmod +x transvhosts.pl
  3. ./transvhosts.pl --dest-dir /home/www/vhosts/

However end up with the following error: - unable to execute ./transvhosts.pl: No such file for directory

Tried steps a few times with the same result, any insight to help resolve would be appreciated.

Thank you
 
Hi Chad,

you might experience such issues, when you are using "copy&paste". Pls be informed that, when a command from a website/forum has been copied with HTML/BB-Code - formats over your browser and you then pasted the copied content ( with the additional HTML/BB-Code - formats ) onto your ssh-command - line, you may experience such issues as described. Even if you don't see ( possible ) HTML/BB-Code - formats on your command line ( because your ssh - client can't display them ), they still might exist. The result is, that your copied command will break at some point and possible command - options won't be included in your command. Pls. either COPY such commands from websites/forums FIRST into an ASCII - text - editor ( on windows, you have for example "notepad.exe" ) and afterwards COPY the command AGAIN FROM THERE, before you paste the command onto your command line, or consider to TYPE the provided command at the ssh - command - line, to avoid such issues. ;)
 
Hello,

I thought this might be the cause for a previous error, so did what you had mentioned before posting the question here to help eliminate related errors.
Typing in this command or copying over to notepad and in presented this error noted here, any other thoughts?
 
Hi Chad,

pls. make sure that you use the user "root", when performing the above commands and make sure, that you use a "bash" - environment with the SSH - client.

List the current files ( /folders ) in your current folder, when you experience such issues, in order to be able to see the files and their permissions:
Code:
ls -lah
 
Hello,

Root is being used and here is the list with (ls -lah)

dr-xr-x---. 8 root root 4.0K Dec 8 15:03 .
dr-xr-xr-x. 26 root root 4.0K Dec 10 08:18 ..
-rw-------. 1 root root 7.0K Apr 15 2015 anaconda-ks.cfg
drwxr-xr-x 2 root root 4.0K Dec 7 04:18 .autoinstaller
-rw------- 1 root root 9.4K Dec 10 12:02 .bash_history
-rw-r--r--. 1 root root 18 May 20 2009 .bash_logout
-rw-r--r--. 1 root root 176 May 20 2009 .bash_profile
-rw-r--r--. 1 root root 176 Sep 22 2004 .bashrc
-rw-r--r-- 1 root root 27K Apr 14 2015 cldeploy
drwxr-xr-x 3 root root 4.0K Jun 14 09:34 .cpanm
-rw-r--r--. 1 root root 100 Sep 22 2004 .cshrc
drwxr-xr-x 4 root root 4.0K Apr 11 2016 custom_templates
-rw-r--r-- 1 root root 424 May 21 2015 dhparams.pem
-rw-r--r-- 1 root root 31K Dec 26 2015 index.html
-rw-r--r-- 1 root root 2.3K Jan 19 2016 index.html.1
-rw-r--r--. 1 root root 9.2K Apr 15 2015 install.log
-rw-r--r--. 1 root root 2.9K Apr 15 2015 install.log.syslog
-rw-r--r-- 1 root root 49K May 10 2015 kernelcare-latest.deb
-rw-r--r-- 1 root root 51K Jun 10 2016 kernelcare-latest.deb.1
drwxr-xr-x 65 root root 4.0K Dec 7 04:14 parallels
drwxr----- 3 root root 4.0K Apr 15 2015 .pki
-rw------- 1 root root 1.0K Apr 11 2016 .rnd
-rw-r--r-- 1 root root 11K Nov 29 12:31 select
drwx------ 2 root root 4.0K Apr 15 2015 .ssh
-rwxr-xr-x 1 root root 27K Aug 9 2015 SSLfix.sh
-rw-r--r-- 1 root root 5.0K Aug 9 2015 SSLfix.zip
-rw-r--r--. 1 root root 129 Dec 3 2004 .tcshrc
-rwxr-xr-x 1 root root 17K Dec 16 2014 transvhosts.pl

Thank you
 
Hi Chad,

consider to use the FULL path for your command:
Code:
Example command over the command line ( logged in as user "root" ), where "transvhosts.pl" is located at "/root/transvhosts.pl":

perl /root/transvhosts.pl ...
 
Last edited by a moderator:
Hello,

What happened was missing 'perl' to run the command - adding (perl transvhosts.pl --dest-dir /home/vhosts) corrected and ran appropriately.

Now that this has run, there is an error:

(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: index.php

Have looked at a few articles in relation, but not sure if they relate to this scenario - any thoughts on what could be causing this error?

Thank you
 
Hi Chad,

pls. consider to open a NEW thread, if your experience completely different issues/errors/problems, so that the content of a thread meets the thread title. ;)
 
Back
Top