• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved New configuration files for the Apache web server were not created due to the errors in configuration templates: Can not restart web server: Apache is

marco76

New Pleskian
hi all,
i have my Plesk stuck at Plesk Obsidian 18.0.28 Update #3 and was unable to update it, so i did a Plesk Repair hoping for a fix.
But now i got this error "New configuration files for the Apache web server were not created due to the errors in configuration templates: Can not restart web server: Apache is down, start it instead of graceful Apache is down, start it instead of graceful . 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"
...and all my website and mail services arent working.
Clicked where it says but nothing happens...

what can i do?
thanks!
 
Last edited:
if i enter "See the details in Configuration Troubleshooter", i see in red these files:

/var/www/vhosts/system/*websiteaddres*/conf/httpd.conf
/var/www/vhosts/system/*websiteaddres*/conf/httpd.conf
this for all the webiste i have
and then:
/etc/apache2/plesk.conf.d/webmails/*websiteaddres*_webmail.conf
same with all the webistes' emails

what can i do?
 
if i try the "Rebuild this config file", plesk return this enormous error:


Error: Can not reconfigure web server configurations: Unable to execute httpdmng: [2020-11-13 18:51:35.344] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081' '--graceful'] with exit code [255]
[2020-11-13 18:51:35.587] ERR [panel] Apache config (16052933660.69893100) generation failed: Template_Exception: Can not restart web server: Apache is down, start it instead of graceful
Apache is down, start it instead of graceful

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 122
code: 0
plesk sendmail[20364]: Unable to resolve fqdn: Name or service not known
plesk sendmail[20364]: It is impossible to detect the FQDN of the host.
Please make sure that the host name is correctly specified in /etc/hosts and goes right after the host's IP address.
Depending on your OS, you might need to set the host name in /etc/HOSTNAME or /etc/hostname.
plesk sendmail[20364]: Unable to retrieve hostname. Use localhost.localdomain instead.
Can not restart web server: Apache is down, start it instead of graceful
Apache is down, start it instead of graceful
 
also, to finish, i just got this email from my service provider:


Unable to generate the web server configuration file on the host <stock.ovh> because of the following errors:

Template_Exception: Can not restart web server: Apache is down, start it instead of graceful
Apache is down, start it instead of graceful

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 122
code: 0

Please resolve the errors in web server configuration templates and generate the file again.
 
"plesk sendmail[20364]: Unable to resolve fqdn: Name or service not known
plesk sendmail[20364]: It is impossible to detect the FQDN of the host.
Please make sure that the host name is correctly specified in /etc/hosts and goes right after the host's IP address.
Depending on your OS, you might need to set the host name in /etc/HOSTNAME or /etc/hostname."

Have you checked that your host name is set in your operating system? If not, that is probably a good point to start with the search for a solution.
 
"plesk sendmail[20364]: Unable to resolve fqdn: Name or service not known
plesk sendmail[20364]: It is impossible to detect the FQDN of the host.
Please make sure that the host name is correctly specified in /etc/hosts and goes right after the host's IP address.
Depending on your OS, you might need to set the host name in /etc/HOSTNAME or /etc/hostname."

Have you checked that your host name is set in your operating system? If not, that is probably a good point to start with the search for a solution.
sorry but im a total noob for this stuff...

here is what i got in /etc/hosts:

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
127.0.1.1 vps-e975b069.vps.ovh.net vps-e975b069
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

in /etc/hostname i got this:
stock.ovh
 
In /etc/hosts add at least a line like this:

<Server's public IPv4 address> <Server's domain name>

For example

123.123.234.210 mydomain.com
 
In /etc/hosts add at least a line like this:

<Server's public IPv4 address> <Server's domain name>

For example

123.123.234.210 mydomain.com
for Server's domain name, any name will be ok? or one of the website i got into plesk?
or should i put stock.ovh like in /etc/hostname?
 
Please use the host name that you have set in Plesk. Your server has a domain name, a "fully qualified domain name" ("fqdn"). Currently, there is no external IP address of your server associated with the domain name of your server, for that reason some services cannot start, because they need that association. So do not use any fantasy name, but the real name that your server has and by that it should be accessible from the Internet.
 
i guess that's the one on the right sidebar under System Overview.

  • Hostname: stock.ovh
  • IP address: xxxxx
  • OS: ‪Debian 8.11‬
i added a line into /etc/hosts and restarted the server, but still same error
New configuration files for the Apache web server were not created due to the errors in configuration templates
 
I really don't think that stock.ovh is your public host name, because that is a dummy domain that is not really registered on the Internet.

Maybe you can ask OVH to assist you with this issue, because it really is not a Plesk issue, and if there are such difficulties even with basic server configuration, it probably will only lead to many pages "support" in the forum with no outcome.
 
ok i managed to add the ip and some of my website are live again, but not all of them...
they still have errors in conf files as i see in the troubleshooter
(but still i have this error in plesk New configuration files for the Apache web server were not created due to the errors in configuration templates)

you may know why?

EDIT:
now they works and no more Apache errors.
THANKS A LOT PETER!!
 
Last edited:
Back
Top