Symptoms
-
When rebuilding web-server configuration, the operation fails with the “Refusing to create symlink” error messages:
ERR [panel] Apache config (15701060840.16755700) generation failed: Template_Exception: Refusing to create symlink '/var/www/vhosts/system/example.com/conf/last_nginx.conf': file with the same name already exists
Cause
Plesk fails to create symlinks for last_httpd.conf
/ last_ip_default.conf
/ last_nginx.conf
in configuration directories of virtual hosts because these files already exist as regular files (not symlinks).
Resolution
-
Connect to the Plesk server via SSH.
-
Remove all
last_httpd.conf
that are not symlinks:# find /var/www/vhosts/system/ -name last_httpd.conf -type f -exec rm {} ;
-
Remove all
last_nginx.conf
that are not symlinks:# find /var/www/vhosts/system/ -name last_nginx.conf -type f -exec rm {} ;
-
Remove all
last_ip_default.conf
that are not symlinks:# find /var/www/vhosts/system/ -name last_ip_default.conf -type f -exec rm {} ;
-
Re-generate web-server configuration:
# plesk repair web -y