Webserver (Apache/nginx) configs regeneration fails because created symlink file name of latest Apache config already exists

Created:

2016-11-16 12:48:26 UTC

Modified:

2017-04-24 12:11:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Webserver (Apache/nginx) configs regeneration fails because created symlink file name of latest Apache config already exists

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 12.0 for Linux

Symptoms

Generating Apache configs fails with the following error in /usr/local/psa/admin/logs/panel.log or in an email to the Plesk administrator: `2012-08-13T15:13:33+07:00 ERR (3): Apache config (13448456120.70254100) generation failed: Refusing to create symlink '/srv/www/vhosts/test1.tld/conf/last_httpd.include': file with the same name already exists`## Cause Plesk can't create the symlinks **last\\_httpd.include** or **last\\_nginx.conf** in config directories of vhosts because files with these names (not symlinks) already exist. Plesk can create symlinks with these names, but not files. Therefore, these files must be created manually or copied.## Resolution
Remove or rename the extra files:
# mv /srv/www/vhosts/test1.tld/conf/last_httpd.include /srv/www/vhosts/test1.tld/conf/custom_last_httpd.include
To find the files that are not links, use the following commands:
# HTTPD_VHOSTS_D=`cat /etc/psa/psa.conf | grep HTTPD_VHOSTS_D | awk '{print $2}'`
# for i in `ls -1 $HTTPD_VHOSTS_D/*/conf/{last_httpd.include,last_nginx.conf}`; do if [ ! -L $i ]; then echo "File $i is not a link! "; fi ; done
File /var/www/vhosts/MixeD.tLd/conf/last_httpd.include is not a link!
Have more questions? Submit a request
Please sign in to leave a comment.