Httpd
apache2 httpd 沒有執行
我在Ubuntu 15.10上執行我的 web(+db) 伺服器。
它工作得很好,突然我無法訪問我的網站並ping到埠80,443也沒有工作。
命令
service apache2 status
說
● 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.
我試過服務 httpd 狀態
root@dev:/etc/apache2# service httpd status ● httpd.service Loaded: not-found (Reason: No such file or directory) Active: inactive (dead)
結果是這樣的。
我知道 Ubuntu 實際上沒有httpd.conf。
我檢查了沒有其他服務正在使用埠 80 或 443。
有什麼建議麼?
其他一些結果:
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
從輸出中可以看出,您
sshd
出於某種原因使用了不尋常的埠 443。您可以將sshd
埠更改為另一個值,/etc/ssh/sshd_config
然後重新啟動您的sshd
和apache2
實例。