• 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

Plesk 12 Move Vhosts error 403

If I run "transvhosts.pl --dest-dir /var/www/vhosts/" at any time I get:

Code:
root@h2360773:/etc/apache2/plesk.conf.d# /usr/local/psa/bin/transvhosts.pl --dest-dir /var/www/vhosts/
Moving files to new directory...
Correct psa configuration file...
Correct passwd file...
Correct php-fpm pools configuration...
Correct database...
Update hosting settings...
done
Update subdomains settings...
done
Update system users settings...
done
The service node 'local' was successfully updated.
 
root@h2360773:/etc/apache2/plesk.conf.d# sudp /opt/psa/admin/sbin/packagemng -sdf
No command 'sudp' found, did you mean:
Command 'sup' from package 'sup' (universe)
Command 'sfdp' from package 'graphviz' (main)
Command 'sudo' from package 'sudo' (main)
Command 'sudo' from package 'sudo-ldap' (universe)
sudp: command not found

What is this?
Run

# /opt/psa/admin/sbin/packagemng -sdf
 
I did, "sudp is just me typing sudo wrong.
I tried the command with sudo after the first try did not give any output.

Here is everything executed again.
Code:
root@h2360773:/etc/apache2/plesk.conf.d# /usr/local/psa/bin/transvhosts.pl --dest-dir /data/www/vhosts/
Moving files to new directory...
Correct psa configuration file...
Correct passwd file...
Correct php-fpm pools configuration...
Correct database...
Update hosting settings...
done
Update subdomains settings...
done
Update system users settings...
done
[2014-10-31 09:54:05] ERR [util_exec] proc_close() failed
Unable to read apache features from the service node: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory
get_apache_path: '/usr/sbin/apache2ctl -V' failed


Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-server
)

Details: [2014-10-31 09:54:08] ERR [util_exec] proc_close() failed
[2014-10-31 09:54:10] ERR [util_exec] proc_close() failed
[2014-10-31 09:54:11] ERR [panel] Apache config (14147492480.50129100) generation failed: Template_Exception: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory

file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory


Can`t reconfigure web server

root@h2360773:/etc/apache2/plesk.conf.d# rm server.conf

root@h2360773:/etc/apache2/plesk.conf.d# /opt/psa/admin/sbin/packagemng -sdf

root@h2360773:/etc/apache2/plesk.conf.d# /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
Execution failed.
Command: httpdmng
Arguments: Array
(
    [0] => --reconfigure-server
)

Details: [2014-10-31 09:54:52] ERR [util_exec] proc_close() failed
[2014-10-31 09:54:54] ERR [util_exec] proc_close() failed
[2014-10-31 09:54:55] ERR [panel] Apache config (14147492920.56822200) generation failed: Template_Exception: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory

file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory

Line #16 of server.conf
Code:
DocumentRoot "/var/www/vhosts/default/htdocs"
 
You defined the destination to "--dest-dir /data/www/vhosts/" , but the server.conf still chooses the previous path : DocumentRoot "/var/www/vhosts/default/htdocs" . Did you probably created custom templates in the folder "/usr/local/psa/admin/conf/templates/custom" and didn't change the custom "server.conf" now? Be aware, that Plesk never touches custom folders - only the default ones.
 
Hi,
Thanks for the suggestion but, as I stated in the first post in this thread, the installation is fresh out of the box. The only thing I did to the system is remove apparmor and then install plesk.
It was a completely untouched installation of Ubuntu 14.04 LTS

I havn't modified anything else
 
I had the same trouble as described in this thread.
I tried to move /var/www/vhosts to /data/www/vhosts.

transvhosts.pl showed an error about a DocumentRoot in the server.conf file that doesn't exist (which makes sense, since that file still points to the old directory).
When you manually set the right path in that file (12 locations) it get's overwritten when you call "websrvmng --reconfigure-all".

I fixed it this way:

I followed this KB article (http://kb.odin.com/en/115587) to install an extension that checks all your config files.
This extension has an 'rebuild all' option and that option was able to generate the server.conf with the right path (/data/www/vhosts).
 
Thanks for the reply.

This is the error I get when opening the panel on the configuration troubleshooter page:

Code:
Error: New configuration files for the Apache web server were not created due to the errors in configuration templates: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory. <a target="_blank" href="http://kb.parallels.com/en/products/?id=52&qprod=52">Search in KB</a>

When I tell it to rebuild all I get the following:
Code:
Error: Can not reconfigure web server configurations: Unable to execute httpdmng: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
)

Details: [2014-11-03 08:26:29] ERR [util_exec] proc_close() failed
[2014-11-03 08:26:31] ERR [util_exec] proc_close() failed
[2014-11-03 08:26:32] ERR [panel] Apache config (14150031890.47465500) generation failed: Template_Exception: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory

file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/plesk.conf.d/server.conf:6
AH00526: Syntax error on line 16 of /etc/apache2/plesk.conf.d/server.conf:
DocumentRoot must be a directory


I did the following:
  • run "sudo transvhosts.pl --dest-dir /data/www/vhosts/"
  • ran the configuration troubleshooter in the panel and rebuild all
I am in quite a desperate need for a fix, the server should have been online last week.
 
I can say that developers confirmed this bug on Plesk 12.0.8. It was submitted as PPP-12723 for your reference.
 
Hello Igor,

thank you very much for all the help and support you have given me. It is greatly appreciated!

One last question: is there a way for me to install plesk 11.5 or any other previous version where this bug is not present yet? This is really urgent, as I need to have the server ready soon.

Thanks again!
 
Yes, you can install it. Just use --all-versions option for autoinstaller and select needed version for installation.
 
Back
Top