Apache cannot start. Syntax error <Directory> was not closed. Syntax error <VirtualHost> was not closed.

Created:

2016-11-16 12:50:27 UTC

Modified:

2016-12-21 19:20:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Apache cannot start. Syntax error <Directory> was not closed. Syntax error <VirtualHost> was not closed.

Symptoms

Apache cannot start with following errors:

# service httpd start
Starting httpd: httpd: Syntax error on line 223 of /etc/httpd/conf/httpd.conf:
Syntax error on line 9 of /etc/httpd/conf.d/zz010_psa_httpd.conf:
Syntax error on line 136 of /etc/httpd/conf/plesk.conf.d/vhosts/domain.tld.conf: /etc/httpd/conf/plesk.conf.d/vhosts/domain.tld.conf:216:
<Directory> was not closed.\

/etc/httpd/conf/plesk.conf.d/vhosts/domain.tld.conf:136: was not closed. [FAILED]

Cause

Domain configuration file has wrong syntax due to corruption or was manually edited.

Resolution

To fix the current domain configuration run:

#/usr/local/psa/admin/bin/httpdmng --reconfigure-domain -domain-name domain.tld
Have more questions? Submit a request
Please sign in to leave a comment.