SilverNightaFall SilverNightaFall - 1 year ago 109
Apache Configuration Question

Ubuntu error with apache: (98)Address already in use

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
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.

I have this in my ports.conf

NameVirtualHost *:80
Listen 80

This is my vhost file

<VirtualHost *:80>
# 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

What am I missing?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download