【问题标题】:Apache server no working (ubuntu 16.04, lamp server)Apache 服务器不工作(ubuntu 16.04,lamp 服务器)
【发布时间】:2016-10-01 10:00:07
【问题描述】:
sudo /etc/init.d/apache2 restart
     [....] Restarting apache2 (via systemctl): apache2.serviceJob for    
     apache2.service failed because the control process exited with error   
     code. See "systemctl status apache2.service" and "journalctl -xe" for 
     details.
     failed!
     techadon@techadon-M68MT-D3:~$ sudo systemctl status apache2.service

apache2.service - LSB: Apache2 web server
     Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
     Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
     Active: failed (Result: exit-code) since Sat 2016-10-01 11:48:31 SAST;  
     1min 3
     Docs: man:systemd-sysv-generator(8)
     Process: 4128 ExecStop=/etc/init.d/apache2 stop (code=exited, 
     status=0/SUCCESS
     Process: 636 ExecReload=/etc/init.d/apache2 reload (code=exited, 
     status=0/SUCC
     Process: 4154 ExecStart=/etc/init.d/apache2 start (code=exited,   
     status=1/FAILU

Oct 01 11:48:31 techadon-M68MT-D3 apache2[4154]:  *
Oct 01 11:48:31 techadon-M68MT-D3 apache2[4154]:  * The apache2 configtest faile

Oct 01 11:48:31 techadon-M68MT-D3 apache2[4154]: Output of config test was:
Oct 01 11:48:31 techadon-M68MT-D3 apache2[4154]: apache2: Syntax error on line 2

Oct 01 11:48:31 techadon-M68MT-D3 apache2[4154]: Action 'configtest' failed.
Oct 01 11:48:31 techadon-M68MT-D3 apache2[4154]: The Apache error log may have m

Oct 01 11:48:31 techadon-M68MT-D3 systemd[1]: apache2.service: Control process e

Oct 01 11:48:31 techadon-M68MT-D3 systemd[1]: Failed to start LSB: Apache2 web s

Oct 01 11:48:31 techadon-M68MT-D3 systemd[1]: apache2.service: Unit entered fail

Oct 01 11:48:31 techadon-M68MT-D3 systemd[1]: apache2.service: Failed with resul
lines 1-20/20 (END)

【问题讨论】:

  • 我开始安装每个模块,但它仍然给了我这个错误
  • 每次安装 phpmyadmin 后,都会在 apache 配置文件中包含“include /etc/phpmyadmin/apache2.conf”。如果我尝试重新启动它会给我一个错误
  • 欢迎来到 Stack Overflow!请查看how to ask 以改进您的问题。
  • 可能是使用命令apache2ctl configtest可以帮助...

标签: php apache lamp ubuntu-16.04


【解决方案1】:

您的 apache 配置错误。检查它并重新启动apache。

【讨论】:

  • 那我该怎么办。我应该清除它并重新安装。我这样做了 5 次
  • 如果您的配置错误,重新安装将无法修复。检查 /etc/apache2 中的 apache 配置并查看 how to configure apache
猜你喜欢
  • 2016-04-19
  • 1970-01-01
  • 2017-07-11
  • 1970-01-01
  • 1970-01-01
  • 2017-06-26
  • 2012-05-17
  • 2011-05-15
  • 1970-01-01
相关资源
最近更新 更多