大网数据广告活动
服务器运维问答

apache2 httpd is not running

· 52CE 我爱测

I'm running my web(+db) server on Ubuntu 15.10 . It worked just fine, and suddenly I can't access my site and ping to port 80 neither 443 worked. The command service apache2 status says that ● apache2.service - LSB: Apache2 web s…

问题原文

原帖链接 · Hyungjoon Jeon · CC BY-SA 3.0

I'm running my web(+db) server on Ubuntu 15.10.

It worked just fine, and suddenly I can't access my site and ping to port 80 neither 443 worked.

The command

service apache2 status

says that

● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (exited) since 금 2017-09-22 12:08:47 KST; 4h 41min ago
Docs: man:systemd-sysv-generator(8)
Process: 817 ExecStart=/etc/init.d/apache2 start (code=exited,status=0/SUCCESS)
Memory: 0B
CPU: 0
9월 22 12:08:46 dev apache2[817]: * Starting web server apache2
9월 22 12:08:47 dev apache2[817]: (98)Address already in use: AH0007 make_sock:...443
9월 22 12:08:47 dev apache2[817]: (98)Address already in use: AH00072: make_sock:...443
9월 22 12:08:47 dev apache2[817]: no listening sockets available, shutting down
9월 22 12:08:47 dev apache2[817]: AH00015: Unable to open logs
9월 22 12:08:47 dev apache2[817]: Action 'start' failed.
9월 22 12:08:47 dev apache2[817]: The Apache error log may have more information.
9월 22 12:08:47 dev apache2[817]: *
9월 22 12:08:47 dev systemd[1]: Started LSB: Apache2 web server.
9월 22 16:42:57 dev systemd[1]: Started LSB: Apache2 web server.
Hint: Some lines were ellipsized, use -l to show in full.

I tried service httpd status

root@dev:/etc/apache2# service httpd status
● httpd.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

And the results are this.

I know that Ubuntu actually doesn' have httpd.conf.

I checked that no other service is using port 80 or 443.

Any suggestions?

Some Other results:

dev@dev:/usr/local$ sudo ps -ef | grep apache2
dev      14346 13101  0 17:10 pts/0    00:00:00 grep --color=auto apache2
dev@dev:/usr/local$ sudo netstat -ltnp | egrep :'443|80'
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      709/sshd                                                                                              

tcp6       0      0 :::443                  :::*                    LISTEN      709/sshd                                                                                              

tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      1214/java                                                                                             

tcp6       0      0 :::8009                 :::*                    LISTEN      1214/java                                                                                             

tcp6       0      0 :::8080                 :::*                    LISTEN      1214/java   

已采纳解答

原帖链接 · user1700494 · CC BY-SA 3.0

As one can see from output, your sshd for some reason is using port 443 which is unusual. You may change sshd port to another value in /etc/ssh/sshd_config and then restart both your sshd and apache2 instances.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-09-22)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。