• 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 Apache Server Settings Breaking Apache

nolyoly

New Pleskian
Hello all, when trying to enable apache modules I'm having problems where the spiining disk on the apply button locks up and nothing happens. I tried enabling the PHP7.0 module and waited about 5 mins. It broke apache and I cant start it now. It showed the PHP7.0 module checkbox checked after reloading the page, so I tried to disable it and got this error message.

I'm running Ubuntu 16.04 and Plesk Onyx 17.5.3.

Error: START httpd_modules_ctl --disable authn_core,php7.0 resource(s) deleted resource(s) deleted resource(s) deleted resource(s) deleted resource(s) deleted resource(s) deleted websrvmng: /opt/psa/admin/sbin/apache_control_adapter execution failed: Aug 08 19:37:48 odin apache2[2746]: * The apache2 configtest failed. Aug 08 19:37:48 odin apache2[2746]: Output of config test was: Aug 08 19:37:48 odin apache2[2746]: AH00526: Syntax error on line 26 of /etc/apache2/plesk.conf.d/server.conf: Aug 08 19:37:48 odin apache2[2746]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Aug 08 19:37:48 odin apache2[2746]: Action 'configtest' failed. Aug 08 19:37:48 odin apache2[2746]: The Apache error log may have more information. Aug 08 19:37:48 odin systemd[1]: apache2.service: Control process exited, code=exited status=1 Aug 08 19:37:48 odin systemd[1]: Failed to start LSB: Apache2 web server. Aug 08 19:37:48 odin systemd[1]: apache2.service: Unit entered failed state. Aug 08 19:37:48 odin systemd[1]: apache2.service: Failed with result 'exit-code'. websrvmng: /opt/psa/admin/sbin/apache_control_adapter execution failed: Aug 08 19:37:48 odin apache2[2746]: * The apache2 configtest failed. Aug 08 19:37:48 odin apache2[2746]: Output of config test was: Aug 08 19:37:48 odin apache2[2746]: AH00526: Syntax error on line 26 of /etc/apache2/plesk.conf.d/server.conf: Aug 08 19:37:48 odin apache2[2746]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Aug 08 19:37:48 odin apache2[2746]: Action 'configtest' failed. Aug 08 19:37:48 odin apache2[2746]: The Apache error log may have more information. Aug 08 19:37:48 odin systemd[1]: apache2.service: Control process exited, code=exited status=1 Aug 08 19:37:48 odin systemd[1]: Failed to start LSB: Apache2 web server. Aug 08 19:37:48 odin systemd[1]: apache2.service: Unit entered failed state. Aug 08 19:37:48 odin systemd[1]: apache2.service: Failed with result 'exit-code'.

I have no idea what I did wrong or how to fix this. It seems I have nothing but problems since I started trying to use Plesk. I'm getting very close to moving back to cPanel.

If anyone can help me out I'd appreciate it a ton. I love the Plesk software, but it's just been nothing but problems since the start.
 
Also, when trying to start apache from the services page I get this error now.

Unable to start service: Unable to manage service by apache_control_adapter: ('start', 'web'). Error: Aug 08 19:44:38 odin apache2[5960]: * The apache2 configtest failed. Aug 08 19:44:38 odin apache2[5960]: Output of config test was: Aug 08 19:44:38 odin apache2[5960]: AH00526: Syntax error on line 26 of /etc/apache2/plesk.conf.d/server.conf: Aug 08 19:44:38 odin apache2[5960]: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration Aug 08 19:44:38 odin apache2[5960]: Action 'configtest' failed. Aug 08 19:44:38 odin apache2[5960]: The Apache error log may have more information. Aug 08 19:44:38 odin systemd[1]: apache2.service: Control process exited, code=exited status=1 Aug 08 19:44:38 odin systemd[1]: Failed to start LSB: Apache2 web server. Aug 08 19:44:38 odin systemd[1]: apache2.service: Unit entered failed state. Aug 08 19:44:38 odin systemd[1]: apache2.service: Failed with result 'exit-code'.
 
Hi nolyoly,

you recently upgraded your apache - webserver from version <=2.2 to a version >=2.4 and didn't change necessary definitions, which results in a non-working apache - webserver:

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration

Pls. read and inform yourself about the most important chnges at:

=> Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.4

Pls. check for
Code:
Order deny,allow
Deny from all
and change it to:
Code:
Require all denied


Pls. check for
Code:
Order allow,deny
Allow from all
and change it to:
Code:
Require all granted

... pls. look for other changes at the above mentioned link.​


You might consider to search for related/current settings, with find - commands like:
Code:
find /usr/local/psa/admin/conf/templates -type f -name "*.php" -exec grep --color -Hni "Order" {} \;

or/and

find /etc/apache2 -type f -name "*.conf" -exec grep --color -Hni "Order" {} \;

or/and

find /var/www/vhosts/system/*/conf -type f -name "*.conf" -exec grep --color -Hni "Order" {} \;
 
Hi nolyoly,

you recently upgraded your apache - webserver from version <=2.2 to a version >=2.4 and didn't change necessary definitions, which results in a non-working apache - webserver:



Pls. read and inform yourself about the most important chnges at:

=> Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.4

Pls. check for
Code:
Order deny,allow
Deny from all
and change it to:
Code:
Require all denied


Pls. check for
Code:
Order allow,deny
Allow from all
and change it to:
Code:
Require all granted

... pls. look for other changes at the above mentioned link.​


You might consider to search for related/current settings, with find - commands like:
Code:
find /usr/local/psa/admin/conf/templates -type f -name "*.php" -exec grep --color -Hni "Order" {} \;

or/and

find /etc/apache2 -type f -name "*.conf" -exec grep --color -Hni "Order" {} \;

or/and

find /var/www/vhosts/system/*/conf -type f -name "*.conf" -exec grep --color -Hni "Order" {} \;

I didn't upgrade it. All I did was try enabling Apache modules through the Plesk panel. So I couldn't have misspelled anything. I didn't type anything. Just clicked the check boxes.
 
Hi nolyoly,

you recently upgraded your apache - webserver from version <=2.2 to a version >=2.4 and didn't change necessary definitions, which results in a non-working apache - webserver:



Pls. read and inform yourself about the most important chnges at:

=> Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.4

Pls. check for
Code:
Order deny,allow
Deny from all
and change it to:
Code:
Require all denied


Pls. check for
Code:
Order allow,deny
Allow from all
and change it to:
Code:
Require all granted

... pls. look for other changes at the above mentioned link.​

And if you do so, plesk repair brings back all this "Order allow,deny" things.
Ubuntu 16.x comes with Apache 2.4.x per default. (apache2 -v == Apache/2.4.18 (Ubuntu))
 
Hi LTUser,

And if you do so, plesk repair brings back all this "Order allow,deny" things.
Actually I couldn't reproduce the issue, that the Plesk Repair Utility rewrites the depending configuration files with => "Order allow,deny" things. The actual templates use for example:
Code:
<?php if ($VAR->server->webserver->apache->useRequireOption): ?>
    Require all granted
<?php endif; ?>
    Order allow,deny
    Allow from all
... so that the => "Order allow,deny" things depend on your current used apache version.

But I would assume, that you probably use old or custom webserver configuration templates, which might be the root cause of such a described issue. Would you mind posting the results of:
Code:
find /usr/local/psa/admin/conf/templates -type f -name "*.php" -exec grep --color -Hni "Order" {} \;
and could you pls. as well be so kind to add the corresponding *.php - files as attachments at your next post, which you found with the above find - commands?​
 
Last edited by a moderator:
I think i got the error...
The "useRequireOption" isn't set always the right way and "Order Allow / deny" is sometimes also set when the Apache version is "2.4.18". So i removed all "Order..." i found in the templates in "/usr/local/psa/admin/conf/templates/*" and change it to "require..." now the error is gone. (Sorry for my bad english :( )
 
Back
Top