apache2.service 的作业失败,因为控制进程退出并显示错误代码。无法找到错误原因

apache2.service 的作业失败,因为控制进程退出并显示错误代码。无法找到错误原因

我正在尝试在我的服务器上启用这两个网站。当我通过 cli 启用 sturtz.ml 时,a2ensite sturtz.mlsystemctl reload apache2得到了apache2.service is not active, cannot reload.当我运行时systemctl start apache2,我得到了

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
root@sturtz:/etc/apache2/sites-enabled# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2020-10-12 21:43:09 CDT; 4s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 945223 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 12 21:43:09 sturtz.ml systemd[1]: Starting The Apache HTTP Server...
Oct 12 21:43:09 sturtz.ml apachectl[945223]: Action 'start' failed.
Oct 12 21:43:09 sturtz.ml apachectl[945223]: The Apache error log may have more information.
Oct 12 21:43:09 sturtz.ml systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Oct 12 21:43:09 sturtz.ml systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 12 21:43:09 sturtz.ml systemd[1]: Failed to start The Apache HTTP Server.

cat /var/log/apache2/error.log

PHP Warning:  PHP Startup: Unable to load dynamic library 'mysql.so' (tried: /usr/lib/php/20190902/mysql.so (/usr/lib/php/20190902/mysql.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mysql.so.so (/usr/lib/php/20190902/mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
PHP Warning:  Module 'PDO' already loaded in Unknown on line 0
[Mon Oct 12 00:03:31.467030 2020] [mpm_prefork:notice] [pid 543303] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f mod_fcgid/2.3.9 configured -- resuming normal operations
[Mon Oct 12 00:03:31.467061 2020] [core:notice] [pid 543303] AH00094: Command line: '/usr/sbin/apache2'
sh: 1: disown: not found
Security: Check for the 'lool' username overridden on the command line.
Init vcl
preload: merged unordf ucpchelp1 msforms vbaobj pcr vbaswobj sw animcore hwp flash chartcore solver sc wpftcalc xof ucpcmis1 wpftdraw sd svgfilter evtatt graphicfilter wpftimpress sdfilt sm pdffilter PresentationMinimizer protocolhandler ucpdav1 wpftwriter msword writerfilter t602filter xmlfa basctl binaryurp uuresolver scd chartcontroller ldapbe2 dba sdbt deploymentgui migrationoo2 migrationoo3 xsltfilter sdd embobj emboleobj log expwrap odfflatxml textfd storagefd xmlfd frm fwl fwm io textconversiondlgs smd mozbootstrap oox scfilt slideshow proxyfac vclcanvas canvasfactory mtfrenderer simplecanvas dlgprov basprov stringresource dbaxml calc dbase flat writer reflection bootstrap introspection invocation invocadapt namingservice stocservices cached1 ucppkg1 srtrs1 ucptdoc1 xsltdlg swd cui bib guesslang numbertext offacc scn scriptframe dbpool2 xmlsecurity analysis date pricing fps_office i18nsearch xsec_xmlsec emfio vbaevents pdfimport mysql_jdbc ucpext hyphen spell lnth for ctl passwordcontainer svgio
Absent (often optional): sm sm sm sm sm sm sm sm sm sm sm smd 
Disabled: ucpftp1 rptxml dbu dbmm rptui rpt mork odbc sdbc2 cmdmail syssh ucphier1 ucpimage PresenterScreen abp dbp updatefeed 
Whitelisted languages: de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru 
Preloading dictionaries: de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB it_CH nl_BE pt_PT es_ES 
Preloading thesauri: de_DE en_US fr_FR it_IT nl_NL pt_BR ru_RU en_GB it_CH nl_BE pt_PT es_ES 
Preload icons
Preload languages
Preload fonts
Ready to accept connections on port 9982.

sh: 1: /usr/bin/youtube-dl: not found
[Mon Oct 12 21:42:16.409452 2020] [mpm_prefork:notice] [pid 543303] AH00171: Graceful restart requested, doing restart
[Mon Oct 12 21:42:19.836167 2020] [:emerg] [pid 543303] AH00020: Configuration Failed, exiting
wsd-546734-546734 2020-10-13 02:42:20.225535 [ loolwsd ] SIG   Shutdown signal received: SIGTERM
frk-546736-546736 2020-10-13 02:42:20.225653 [ forkit ] SIG   Shutdown signal received: SIGTERM
kit-546977-546736 2020-10-13 02:42:20.227003 [ kit_spare_001 ] SIG   Shutdown signal received: SIGTERM
wsd-546734-546734 2020-10-13 02:42:20.631408 [ loolwsd ] SIG   Fatal signal received: SIGBUS
Backtrace 546734:
AH00016: Configuration Failed
AH00016: Configuration Failed

Sturtz.ml 配置文件:

<VirtualHost *:80 *:80>
SuexecUserGroup "#1013" "#1010"
ServerName sturtz.ml
ServerAlias www.sturtz.ml
ServerAlias mail.sturtz.ml
ServerAlias webmail.sturtz.ml
ServerAlias admin.sturtz.ml
DocumentRoot /home/sturtz/public_html
ErrorLog /var/log/virtualmin/sturtz.ml_error_log
CustomLog /var/log/virtualmin/sturtz.ml_access_log combined
ScriptAlias /cgi-bin/ /home/sturtz/cgi-bin/
ScriptAlias /awstats/ /home/sturtz/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/sturtz/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.4
FCGIWrapper /home/sturtz/fcgi-bin/php7.4.fcgi .php
FCGIWrapper /home/sturtz/fcgi-bin/php7.4.fcgi .php7.4
</Directory>
<Directory /home/sturtz/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://sturtz.ml:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://sturtz.ml:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.4
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
<Files awstats.pl>
AuthName "sturtz.ml statistics"
AuthType Basic
AuthUserFile /home/sturtz/.awstats-htpasswd
require valid-user
</Files>
Alias /dav /home/sturtz/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "sturtz.ml"
AuthUserFile /home/sturtz/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.4
RewriteEngine off
</Location>
<Files awstats.pl>
AuthName "sturtz.ml statistics"
AuthType Basic
AuthUserFile /home/sturtz/.awstats-htpasswd
require valid-user
</Files>
</VirtualHost>
<VirtualHost 192.168.1.8:443 [2604:99c0:8:2f96:223:24ff:fe08:581f]:443>
SuexecUserGroup "#1013" "#1010"
ServerName sturtz.ml
ServerAlias www.sturtz.ml
ServerAlias mail.sturtz.ml
ServerAlias webmail.sturtz.ml
ServerAlias admin.sturtz.ml
DocumentRoot /home/sturtz/public_html
ErrorLog /var/log/virtualmin/sturtz.ml_error_log
CustomLog /var/log/virtualmin/sturtz.ml_access_log combined
ScriptAlias /cgi-bin/ /home/sturtz/cgi-bin/
ScriptAlias /awstats/ /home/sturtz/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/sturtz/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.4
FCGIWrapper /home/sturtz/fcgi-bin/php7.4.fcgi .php
FCGIWrapper /home/sturtz/fcgi-bin/php7.4.fcgi .php7.4
</Directory>
<Directory /home/sturtz/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://sturtz.ml:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://sturtz.ml:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.4
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
SSLEngine on
SSLCertificateFile /etc/ssl/sturtz.ml/private.key
SSLCertificateKeyFile /etc/ssl/cloud.sturtz.ml/certificate.crt
<Files awstats.pl>
AuthName "sturtz.ml statistics"
AuthType Basic
AuthUserFile /home/sturtz/.awstats-htpasswd
require valid-user
</Files>
Alias /dav /home/sturtz/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "sturtz.ml"
AuthUserFile /home/sturtz/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.4
RewriteEngine off
</Location>
SSLCACertificateFile /etc/ssl/sturtz.ml/ca_bundle.crt
</VirtualHost>

cloud.sturtz.ml 配置文件:

<VirtualHost 192.168.1.8:80 [2604:99c0:8:2f96:223:24ff:fe08:581f]:80> 
SuexecUserGroup "#1012" "#1009"
ServerName cloud.sturtz.ml
ServerAlias www.cloud.sturtz.ml
ServerAlias mail.cloud.sturtz.ml
ServerAlias webmail.cloud.sturtz.ml
ServerAlias admin.cloud.sturtz.ml
ServerAlias autoconfig.cloud.sturtz.ml
ServerAlias autodiscover.cloud.sturtz.ml
DocumentRoot /home/cloud/public_html
#Alias /postfixadmin /usr/share/postfixadmin/public
ErrorLog /var/log/virtualmin/cloud.sturtz.ml_error_log
CustomLog /var/log/virtualmin/cloud.sturtz.ml_access_log combined
ScriptAlias /cgi-bin/ /home/cloud/cgi-bin/
ScriptAlias /awstats/ /home/cloud/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml /home/cloud/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml /home/cloud/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml /home/cloud/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/cloud/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddType application/x-httpd-php7.4 .php7.4
</Directory>
<Directory /home/cloud/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.cloud.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://cloud.sturtz.ml:20000/ [R]
ProxyPass /sites/ https://cloud.sturtz.ml/index.php/apps/cms_pico/pico_proxy/
ProxyPassReverse /sites/ https://cloud.sturtz.ml/index.php/apps/cms_pico/pico_proxy/
SSLProxyEngine on
RewriteCond %{HTTP_HOST} =admin.cloud.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://cloud.sturtz.ml:10000/ [R]
<Files awstats.pl>
AuthName "cloud.sturtz.ml statistics"
AuthType Basic
AuthUserFile /home/cloud/.awstats-htpasswd
require valid-user
</Files>
Alias /dav /home/cloud/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "cloud.sturtz.ml"
AuthUserFile /home/cloud/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.4
RewriteEngine off
</Location>
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
RedirectMatch ^/(?!.well-known)(.*)$ https://cloud.sturtz.ml/$1
</VirtualHost>
<VirtualHost 192.168.1.8:443 [2604:99c0:8:2f96:223:24ff:fe08:581f]:443>
SuexecUserGroup "#1012" "#1009"
ServerName cloud.sturtz.ml
ServerAlias www.cloud.sturtz.ml
ServerAlias mail.cloud.sturtz.ml
ServerAlias webmail.cloud.sturtz.ml
ServerAlias admin.cloud.sturtz.ml
ServerAlias autoconfig.cloud.sturtz.ml
#Alias /postfixadmin /usr/share/postfixadmin/public
ServerAlias autodiscover.cloud.sturtz.ml
DocumentRoot /home/cloud/public_html
ErrorLog /var/log/virtualmin/cloud.sturtz.ml_error_log
CustomLog /var/log/virtualmin/cloud.sturtz.ml_access_log combined
ScriptAlias /cgi-bin/ /home/cloud/cgi-bin/
ScriptAlias /awstats/ /home/cloud/cgi-bin/
ScriptAlias /AutoDiscover/AutoDiscover.xml /home/cloud/cgi-bin/autoconfig.cgi
ScriptAlias /Autodiscover/Autodiscover.xml /home/cloud/cgi-bin/autoconfig.cgi
ScriptAlias /autodiscover/autodiscover.xml /home/cloud/cgi-bin/autoconfig.cgi
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/cloud/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddType application/x-httpd-php7.4 .php7.4
</Directory>
<Directory /home/cloud/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.cloud.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://cloud.sturtz.ml:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.cloud.sturtz.ml
RewriteRule ^(?!/.well-known)(.*) https://cloud.sturtz.ml:10000/ [R]
<Files awstats.pl>
AuthName "cloud.sturtz.ml statistics"
AuthType Basic
AuthUserFile /home/cloud/.awstats-htpasswd
require valid-user
</Files>
Alias /dav /home/cloud/public_html
<Location /dav>
DAV on
AuthType Basic
AuthName "cloud.sturtz.ml"
AuthUserFile /home/cloud/etc/dav.digest.passwd
Require valid-user
ForceType text/plain
Satisfy All
RemoveHandler .php
RemoveHandler .php7.4
RewriteEngine on
</Location>
SSLEngine on
#SSLCertificateFile /home/cloud/ssl.cert
#SSLCertificateKeyFile /home/cloud/ssl.key
SSLCertificateFile /etc/ssl/cloud.sturtz.ml/certificate.crt
SSLCertificateKeyFile /etc/ssl/cloud.sturtz.ml/private.key
SSLCertificateChainFile /etc/ssl/cloud.sturtz.ml/ca_bundle.crt
#SSLCACertificateFile /etc/ssl/cloud.sturtz.ml/ca_bundle.crt
SSLVerifyClient optional
Redirect /mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
Redirect /.well-known/autoconfig/mail/config-v1.1.xml /cgi-bin/autoconfig.cgi
#SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
</VirtualHost>

我可能是盲人,但是我找不到任何地方的错误。

相关内容