Ubuntu的错误与Apache:(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行), PS 来看看有什么应用程序占用的端口,并关闭它。

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.