• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved All apache configuration files are missing

Ivan_K

New Pleskian
When saving the Apache module configuration (the web interface was used), all Apache configs are lost. Attempting to restore them results in an error:
Не удалось настроить веб-сервер:Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-all ) Details: Execution failed. Command: httpdmng Arguments: Array ( [0] => --reconfigure-server [1] => -no-restart ) Details: [2021-09-09 17:50:21.108] 10013:613a1f2d1a3d9 ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1] [2021-09-09 17:50:21.598] 10013:613a1f2d1a3d9 ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code [1] [2021-09-09 17:50:21.835] 10013:613a1f2d1a3d9 ERR [panel] Apache config (16311990200.82353900) generation failed: Template_Exception: AH00526: Syntax error on line 66 of /etc/httpd/conf/httpd.conf: Invalid command 'User', perhaps misspelled or defined by a module not included in the server configuration file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php line: 75 code: 0 AH00526: Syntax error on line 66 of /etc/httpd/conf/httpd.conf: Invalid command 'User', perhaps misspelled or defined by a module not included in the server configuration
This problem happened on a hot server. Please help as soon as possible :(
 
Usually, it is caused by the fact that the Apache configuration file /etc/httpd/conf.modules.d/00-base.conf is missing. As this file belongs to the Apache package, reinstall this package:

# yum reinstall httpd

After that, to apply the changes, repair the web servers' configuration using the command plesk repair web.
 
Repair web server configuration for all domains? [Y/n] y
Repairing web server configuration for all domains. This aspect
can be used with individual domains ("plesk repair web
example.com"), and on the server level ("plesk repair web") ..... [2021-09-10 08:21:59.351] 4453:613aeb6cd121a ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-all'] with exit code [1]
[FAILED]
- httpdmng failed: Execution failed.
Command: httpdmng
Arguments: Array
(
[0] => --reconfigure-server
[1] => -no-restart
)

Details: [2021-09-10 08:21:59.008] 4602:613aeb7701ead ERR
[util_exec] proc_close() failed
['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code
[1]
[2021-09-10 08:21:59.274] 4602:613aeb7701ead ERR [util_exec]
proc_close() failed ['/usr/local/psa/admin/bin/apache-config'
'-t'] with exit code [1]
[2021-09-10 08:21:59.278] 4602:613aeb7701ead ERR [panel] Apache
config (16312513180.71743300) generation failed:
Template_Exception: AH00526: Syntax error on line 66 of
/etc/httpd/conf/httpd.conf:
Invalid command 'User', perhaps misspelled or defined by a
module not included in the server configuration

file:
/usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00526: Syntax error on line 66 of /etc/httpd/conf/httpd.conf:
Invalid command 'User', perhaps misspelled or defined by a
module not included in the server configuration

Repair server-wide configuration parameters for web servers? [Y/n] y
Repairing server-wide configuration parameters for web servers .. [2021-09-10 08:22:36.935] 4453:613aeb6cd121a ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/httpdmng' '--reconfigure-server'] with exit code [1]
[FAILED]
- httpdmng failed: [2021-09-10 08:22:36.525] 4817:613aeb9c80155
ERR [util_exec] proc_close() failed
['/usr/local/psa/admin/bin/apache-config' '-t'] with exit code
[1]
[2021-09-10 08:22:36.871] 4817:613aeb9c80155 ERR [util_exec]
proc_close() failed ['/usr/local/psa/admin/bin/apache-config'
'-t'] with exit code [1]
[2021-09-10 08:22:36.875] 4817:613aeb9c80155 ERR [panel] Apache
config (16312513560.21027300) generation failed:
Template_Exception: AH00526: Syntax error on line 66 of
/etc/httpd/conf/httpd.conf:
Invalid command 'User', perhaps misspelled or defined by a
module not included in the server configuration

file:
/usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
AH00526: Syntax error on line 66 of /etc/httpd/conf/httpd.conf:
Invalid command 'User', perhaps misspelled or defined by a
module not included in the server configuration
 
What is the output of the command:

# ls -la /etc/httpd/conf.modules.d/
 
drwxr-xr-x 2 root root 4096 сен 10 08:19 .
drwxr-xr-x 6 root root 4096 сен 10 08:19 ..
-rw-r--r-- 1 root root 3749 сен 10 08:19 00-base.conf
-rw-r--r-- 1 root root 145 сен 9 14:24 00-dav.conf
-rw-r--r-- 1 root root 41 ноя 16 2020 00-lua.conf
-rw-r--r-- 1 root root 743 сен 9 15:35 00-mpm.conf
-rw-r--r-- 1 root root 983 фев 26 2020 00-proxy.conf
-rw-r--r-- 1 root root 41 ноя 16 2020 00-ssl.conf
-rw-r--r-- 1 root root 90 сен 9 14:44 00-systemd.conf
-rw-r--r-- 1 root root 448 сен 9 14:24 01-cgi.conf
-rw-r--r-- 1 root root 216 ноя 1 2017 10-php.conf.rpmsave
Like I say, there are a lot of configuration files missing.
 
I was able to run Apache. But now, some domains give the default page instead of the site (for example https://www.krephaus.ru/). And some of them redirect to another domain (for example Web Server's Default Page)

And I keep getting an error:
on screenshot

Although, apache is working:
systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/httpd.service.d
└─pcre.conf
Active: active (running) since Пт 2021-09-10 10:25:05 MSK; 5min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 12440 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 13685 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Main PID: 12567 (httpd)
Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec"
Tasks: 7
Memory: 42.2M
CGroup: /system.slice/httpd.service
├─12567 /usr/sbin/httpd -DFOREGROUND
├─13895 /usr/sbin/httpd -DFOREGROUND
├─13896 /usr/sbin/httpd -DFOREGROUND
├─13897 /usr/sbin/httpd -DFOREGROUND
├─13898 /usr/sbin/httpd -DFOREGROUND
├─13900 /usr/sbin/httpd -DFOREGROUND
└─13901 /usr/sbin/httpd -DFOREGROUND
 
Back
Top