apache 的 Ubuntu 错误:(98) 地址已在使用中 [英] Ubuntu error with apache: (98)Address already in use

查看:42
本文介绍了apache 的 Ubuntu 错误:(98) 地址已在使用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 Ubuntu 中启动 Apache 时出现此错误.

I am getting this error when I try to start Apache in Ubuntu.

 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
 no listening sockets available, shutting down
 Unable to open logs
 Action 'start' failed.

我的ports.conf中有这个

I have this in my ports.conf

NameVirtualHost *:80
Listen 80

这是我的虚拟主机文件

<VirtualHost *:80>
          ServerAdmin example@example.com
          ServerName rails.server.com
          # ServerAlias
          DocumentRoot /var/www/sample_app/current/public
          ErrorLog /var/www/sample_app/error.log

          RailsEnv production
        <Directory "/var/www/sample_app/current/public">
          Options Indexes FollowSymLinks MultiViews
          Order allow,deny
          Allow from all
        </Directory>
</VirtualHost>

我错过了什么?

推荐答案

看来 80 端口已经被占用了.使用另一个端口或尝试 netstat(grep 结果只选择其中值为 80 的行)、pskill 查看哪个应用程序占用了端口并关闭它.

It seems port 80 is already taken. Use another port or try netstat (grep the result to select only the row with value 80 in it), ps and kill to see what application occupies the port and shut it down.

这篇关于apache 的 Ubuntu 错误:(98) 地址已在使用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆