Applicable to:
- Plesk for Linux
Symptoms
- The following error is shown in Plesk:
PLESK_ERROR: New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] duplicate location "/fake-hotlink-stub" in /etc/nginx/plesk.conf.d/vhosts/example.com.conf:192 nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter
Cause
There are duplicated entries (with the same path) in wp-toolkit database:
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 "select t1.id,t1.domainId,t1.path from [Instances]t1 where (select count (*) from [Instances]t2 where t1.domainId=t2.domainId and t1.path=t2.path) >1;"
65|17|/httpdocs/examplecom/wp
68|17|/httpdocs/examplecom/wp
Resolution
1. Connect to a Plesk server via SSH.
2. Back up the database:
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 ".backup 'wp-toolkit_bak.sqlite3'"
3. Remove the extra entries (with higher id) from the database:
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 "DELETE FROM Instances WHERE id=68"
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 "DELETE FROM InstanceProperties WHERE instanceId=68"
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3 "DELETE FROM InstancesDomains WHERE instanceId=68"
Comments
0 comments
Please sign in to leave a comment.