重新安装后 Apache 无法启动

重新安装后 Apache 无法启动

在你问之前,是的,我已经搜索过这个问题,并查看了其他几个答案,但都没有帮助。我重新安装了 apache2,现在它总是给我这个消息(使用“journalctl | tail”后):

    Mai 21 19:12:13 v14268 sshd[23964]: Received                         
    disconnect from 212.73.136.72 port 43340:11: Bye Bye         
    [preauth]
    Mai 21 19:12:13 v14268 sshd[23964]: Disconnected from 
    invalid user ait 212.73.136.72 port 43340 [preauth]
    Mai 21 19:12:32 v14268 systemd[1]: Starting The Apache 
    HTTP Server...
    Mai 21 19:12:32 v14268 apachectl[23971]: AH00526: 
    Syntax error on line 3 of /etc/apache2/conf- 
    enabled/phpmyadmin.conf:
    Mai 21 19:12:32 v14268 apachectl[23971]: Invalid 
    command 'Alias', perhaps misspelled or defined by a 
    module not included in the server configuration
    Mai 21 19:12:32 v14268 apachectl[23971]: Action 
    'start' failed.
    Mai 21 19:12:32 v14268 apachectl[23971]: The Apache 
    error log may have more information.
    Mai 21 19:12:32 v14268 systemd[1]: apache2.service: 
    Control process exited, code=exited, status=1/FAILURE
    Mai 21 19:12:32 v14268 systemd[1]: apache2.service: 
    Failed with result 'exit-code'.
    Mai 21 19:12:32 v14268 systemd[1]: Failed to start The 
    Apache HTTP Server.

没有错误日志文件,甚至 apache2 支持页面也没有向我展示此问题的解决方案。我使用的是 Debian 10.4

提前致谢

答案1

Mai 21 19:12:32 v14268 apachectl[23971]: AH00526: 
Syntax error on line 3 of /etc/apache2/conf- 
enabled/phpmyadmin.conf:
Mai 21 19:12:32 v14268 apachectl[23971]: Invalid 
command 'Alias', perhaps misspelled or defined by a 
module not included in the server configuration

这意味着在文件的第 3 行中/etc/apache2/conf-enabled/phpmyadmin.conf您使用了AliasApache 无法理解的命令。

这很可能是因为 Apache 模块mod_alias未激活。运行

sudo a2enmod alias 

来激活它。

相关内容