Applicable to:
- Plesk for Linux
Symptoms
Note: the article is related to the issue that occurs after Apache upgrade (during dist-upgrade for example).
-
After failed Plesk upgrade on Debian OS with Apache version 2.4 installed, web server is not starting.
-
The following error messages appears:
CONFIG_TEXT: apache2: Syntax error on line 234 of /etc/apache2/apache2.conf: Syntax error on line 5 of /etc/apache2/conf.d/zz010_psa_httpd.conf: Syntax error on line 72 of /etc/apache2/plesk.conf.d/server.conf: No matches for the wildcard '*.conf' in '/etc/apache2/plesk.conf.d/ip_default', failing (use IncludeOptional if required)
Action 'configtest' failed.
The Apache error log may have more information.CONFIG_TEXT: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
CONFIG_TEXT: SSLSessionCache: 'shmcb' session cache not supported (known names: dbm,memcache). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).
CONFIG_TEXT: The apache2 instance did not start within 20 seconds. Please read the log files to discover problems.
CONFIG_TEXT: [proxy_balancer:emerg] [pid 25870] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded?
CONFIG_TEXT: Invalid command 'Require', perhaps misspelled or defined by a module not included in the server configuration
CONFIG_TEXT: Invalid command 'User', perhaps misspelled or defined by a module not included in the server configuration1.
CONFIG_TEXT: Invalid command 'DirectoryIndex', perhaps misspelled or defined by a module not included in the server configuration
CONFIG_TEXT: ERROR: Config file dir.conf not properly enabled: /etc/apache2/mods-enabled/dir.conf is a real file, not touching it
Cause
Configuration files were not completely switched to the new Apache 2.4
Resolution
-
Check if custom templates exist in
/usr/local/psa/admin/conf/templates
folder. If so review all of them and changeInclude
toIncludeOptional
in every line what contain wildcard. -
If there are no custom templates change
Include
toIncludeOptional
in every line what contain wildcard in the following files:MYSQL_LIN: /etc/apache2/conf.d/zz010_psa_httpd.conf
/etc/apache2/plesk.conf.d/server.conf
/etc/apache2/plesk.conf.d/horde.conf -
Enable and activate the following Apache modules
# a2enmod authz_core authz_host access_compat socache_shmcb slotmem_shm mpm_worker unixd php5 dir
Comments
1 comment
Hi Renan Poss Moreira,
Good afternoon!
1) May I ask, if the below include is considered by you in a custom template or not:
2) Would this ticket also be applicable for using Apache2 version 2.4 where on debug mode I may see such comments regarding "mod_socache_shmcb"
Where I get the [:error] message for ModSecurity. This happens where:
a) It seems .htaccess file still using "only, deny , allow" Apache2 version 2.2 syntax, when running version 2.4 requiring the syntax of "required" etc.
b) The above mentioning of "mod_socache_shmcb" where on Tools and Settings --> Apache Web Server Settings that mode was already enabled
c) The mentioning of cache changing from value from "1" to "0": 'mod_socache_shmcb.c(745): AH00842: expiring 1 and reclaiming 0 removed socache entries'
d) Seems ModSecurirty reports an error, as possibly an earlier .htaccess already blocked the client IP, where it is called, both on the same millisecond.
e) Could be also related to logroate issues, where the server is acting on different log files?
3) Is the below article, more accurately describing the error this KB article relates to:
https://ibmimedia.com/blog/149/how-to-fix-sslsessioncache-shmcb-session-cache-not-supported
SSLSessionCache cache not supported error occurs when there is an issue with Apache configuration file after an upgrade from version 2.2 to 2.4.
In Plesk
In plesk control panel, after Apache upgrade to version 2.4, you will notice that the configuration files is not completely generated.
To resolve this, inspect the custom templates available in the /usr/local/psa/admin/conf/templates folder. Replace the Include to IncludeOptional in evert line containing a Wildcart. You can observer the following lines;
Additionally, enable a few Apache modules with the command below;
Where these modules are not even listed on Plesk as optional:
And, while these modules are currently DISABLED on my server Plesk installation configuration:
4) What would happen if the include of Mod Security is changed to OPTIONAL as suggested, changing the 'include'?
Please sign in to leave a comment.