• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Apache don't start and 502 Bad Gateway

Eros Bruno

New Pleskian
Hello, I have a problem on my VPS.
plesk shows the error "The new configuration files for the Apache web server were not created due to errors in the configuration templates"
Another error is shown to me when I run the command via ssh: "plesk repair web -server" which fails with the error: "Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
"

Ultimately, the apache web server does not boot in any way.
Can someone help me please? I do not know what to do...:(
 
After message "The new configuration files for the Apache web server were not created due to errors in the configuration templates" should be additional details of this error. Could you please share it here?
 
After message "The new configuration files for the Apache web server were not created due to errors in the configuration templates" should be additional details of this error. Could you please share it here?

"Errore: Impossibile riconfigurare le configurazioni del server web: Unable to execute httpdmng: [2018-09-13 09:32:36.950] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081'] with exit code [255]
[2018-09-13 09:32:39.391] ERR [panel] Apache config (15368238240.65556100) generation failed: Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 109
code: 0
Can not restart web server:"
 

No way...

"root@stock:~# export APACHE_PID_FILE=/var/run/apache2.pid

root@stock:~# service apache2 restart

root@stock:~# service apache2 status

● apache2.service - LSB: Apache2 web server

Loaded: loaded (/lib/systemd/system/apache2.service; enabled)

Drop-In: /lib/systemd/system/apache2.service.d

└─forking.conf

Active: inactive (dead) since Thu 2018-09-13 10:28:00 CEST; 8s ago

Process: 3703 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)

Process: 3687 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)


Sep 13 10:28:00 stock.ovh apache2[3687]: Starting web server: apache2Action 'start' failed.

Sep 13 10:28:00 stock.ovh apache2[3687]: The Apache error log may have more information.

Sep 13 10:28:00 stock.ovh apache2[3687]: .

Sep 13 10:28:00 stock.ovh apache2[3703]: Stopping web server: apache2.

Sep 13 10:28:00 stock.ovh systemd[1]: Started LSB: Apache2 web server.

root@stock:~# strace /opt/psa/admin/bin/apache_control_adapter --restart --restart-interval 0 --http-port 1080 --https-port 1081

-bash: strace: command not found

root@stock:~# ln -s /var/run/apache2.pid /var/run/apache2/apache2.pid

root@stock:~# service apache2 status

● apache2.service - LSB: Apache2 web server

Loaded: loaded (/lib/systemd/system/apache2.service; enabled)

Drop-In: /lib/systemd/system/apache2.service.d

└─forking.conf

Active: inactive (dead) since Thu 2018-09-13 10:28:00 CEST; 1min 33s ago

Process: 3703 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)

Process: 3687 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)


Sep 13 10:28:00 stock.ovh apache2[3687]: Starting web server: apache2Action 'start' failed.

Sep 13 10:28:00 stock.ovh apache2[3687]: The Apache error log may have more information.

Sep 13 10:28:00 stock.ovh apache2[3687]: .

Sep 13 10:28:00 stock.ovh apache2[3703]: Stopping web server: apache2.

Sep 13 10:28:00 stock.ovh systemd[1]: Started LSB: Apache2 web server.

root@stock:~# "
 
"The Apache error log may have more information."
--> /var/log/httpd/error_log or /var/log/apache2/error.log or similar
 
Hi,

I have exactly the same problem. I reinstalled 3 times the VPS, always the same error with Apache as soon as we install a domain. I tried everything you propose as a solution, without success, I do not know what to do!

Regards
 

Attachments

  • erreur_troubleshooter.pdf
    71.1 KB · Views: 3
I am not expert but I had the problem.
I opened putty then connect to the server of the I type :

Code:
nano /etc/hosts

then add the ip of the site

example 1.1.1.1 stock.ovh (for my part at the end it's stock.ovh)

I saved the file then

Code:
 service apache2 restart
 
Last edited by a moderator:
@boutiquepcland
I had seen a solution like the one you propose, but it did not work, in fact it is the template deployed by OVH is not up to date.
By installing only a distribution then install Plesk on the command line, no more problems, everything is OK.
 
Back
Top