• 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
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

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