Applicable to:
- Plesk for Linux
Symptoms
-
The following error is shown within the Plesk GUI:
New configuration files for the Apache web server were not created due to the errors in configuration templates: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf: No such file or directory.
-
The file mentioned in the error message exists, but its link is missing (or vice versa):
# ls -l /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf
lrwxrwxrwx 1 root root 55 Aug 7 13:36 /etc/httpd/conf/plesk.conf.d/vhosts/example.com.conf -> /var/www/vhosts/system/example.com/conf/httpd.conf
# ls -l /var/www/vhosts/system/example.com/conf/httpd.conf
ls: cannot access /var/www/vhosts/system/example.com/conf/httpd.conf: No such file or directory - The domain example.com (from the error message) is not visible anywhere within the Plesk GUI
Cause
The domain was not completely removed from the Linux server and only some web server configuration files that are related to it remain, which causes the error.
Resolution
Click on a section to expand
- Connect to the Plesk server via SSH
-
Rebuild web server configuration files:
# plesk sbin httpdmng --reconfigure-server
- Log into Plesk
- Open Tools & Settings > Webserver Configurations Troubleshooter > Rebuild > Broken:
- Connect to the Plesk server via SSH
- Move vhosts configuration files to the different directories:
For CentOS / RedHat/ CloudLinux:
# mkdir -p /root/plesk-backup-nginx/webmails
# mkdir -p /root/plesk-backup-nginx/vhosts
# mkdir -p /root/plesk-backup-apache/webmails
# mkdir -p /root/plesk-backup-apache/vhosts
# mv /etc/nginx/plesk.conf.d/vhosts/* /root/plesk-backup-nginx/vhosts/
# mv /etc/nginx/plesk.conf.d/webmails/* /root/plesk-backup-nginx/webmails
# mv /etc/httpd/conf/plesk.conf.d/vhosts/* /root/plesk-backup-apache/vhosts
# mv /etc/httpd/conf/plesk.conf.d/webmails/* /root/plesk-backup-apache/webmails/For Debian / Ubuntu:
# mkdir -p /root/pleskbackup/
# mv /etc/apache2/plesk.conf.d/vhosts/* /root/pleskbackup -
Rebuild all web server configuration files from scratch by executing this command:
# plesk sbin httpdmng --reconfigure-all
-
In Plesk create the domain example.com.
-
Connect to the Plesk server via SSH
-
Rebuild domain's configuration files:
# plesk repair web example.com
-
Remove the domain example.com from Plesk.
Note: In case there are other domains with the same issue, perform the same actions mentioned above.
Comments
0 comments
Please sign in to leave a comment.