【问题标题】:Apache2 restart issueApache2重启问题
【发布时间】:2015-09-02 05:33:20
【问题描述】:

我使用的是 Ubuntu 14.04。我正在尝试在我的终端上重新启动 Apache,但它给了我以下错误:

sneha@SCS-I82:~/work/sample_app(master)$ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                                                                                (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
                                                                                                                                         [fail]
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

也尝试了以下命令,但仍然是同样的问题:

sneha@SCS-I82:~/work/sample_app(master)$ sudo service apache2 restart
 * Restarting web server apache2                                                                                                                (98)Address already in use: AH00072: make_sock: could not bind to address [::]:8080
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
                                                                                                                                         [fail]
 * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

我还在 /etc/apache2/apache2.conf 文件的底部添加了ServerName localhost。 我还在 /etc/apache2/ports.conf 文件中将端口更改为 8080。

有人可以提出一些相同的解决方案吗?

【问题讨论】:

    标签: apache ubuntu-14.04


    【解决方案1】:

    其他进程已经在监听 8080 端口。您可以通过运行以下命令找出哪个进程:

    sudo netstat -lnp | grep 8080
    

    否则您可能会将端口从 8080 更改为未使用的端口。

    【讨论】:

      猜你喜欢
      • 2015-08-08
      • 2021-11-14
      • 2012-03-24
      • 2011-09-18
      • 1970-01-01
      • 2011-11-25
      • 1970-01-01
      • 1970-01-01
      • 2011-08-08
      相关资源
      最近更新 更多