Apache port conflict

Discussion in 'Apache' started by Miguelmmm, Sep 20, 2012.

  1. #1
    Hi everybody!

    First of all, I'm using Ubuntu (the latest version)
    Well, my problem is quite simple to exaplin. Before I've done some updates on Ubuntu (including Apache or some of it's modules), everything was working normally: when I started my computer, it atomatically started apache2 and my website was on.
    However, after the updates, things don't work anymore. I tried to make a full reinstall on Apache, but it didn't work. What happens is this: When I start my computer, it doesn't auto start Apache. If I go to the terminal and type "service apache2 start", it gives me the 98 error (saying that port 80 is already in use). If I type in the terminal "sudo nestat -lpn |grep :80", it return just one process using the 80 port: another instance of apache! I followed the process ID and found out that it had origin in the file "/usr/sbin/apache2", which is a shortcut to "/usr/lib/apache2/mpm-prefork/apache2".

    If I kill that process and then, in the terminal, type "service apache2 start", everything goes ok, as usual. The problem is that I have to kill the process every time I restart my computer. Plus the fact that it is not normal...

    Any solutions? I really need Apache working alone on start up...
    Thanks in advance!
     
    Miguelmmm, Sep 20, 2012 IP
  2. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    36
    Best Answers:
    7
    Trophy Points:
    173
    #2
    Look for the Listen parameter in apache config. Remove the duplicate entries if any and restart. See if it works.
     
    MilesWeb, Sep 25, 2012 IP
  3. Miguelmmm

    Miguelmmm Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, I guess I'm supposed to look for it in ports.conf, right?

    So, my ports.conf file is this:

    [COLOR=#333333][FONT=Lucida Console]# If you just change the port or add more ports here, you will likely also[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]# have to change the VirtualHost statement in[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]# /etc/apache2/sites-enabled/000-default[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]# This is also true if you have upgraded from before 2.2.9-3 (i.e. from[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]# README.Debian.gz[/FONT][/COLOR]
    
    [COLOR=#333333][FONT=Lucida Console]NameVirtualHost *:80[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]Listen 80[/FONT][/COLOR]
    
    [COLOR=#333333][FONT=Lucida Console]<IfModule mod_ssl.c>[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    # If you add NameVirtualHost *:443 here, you will also have to change[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    # to <VirtualHost *:443>[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    # Server Name Indication for SSL named virtual hosts is currently not[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    # supported by MSIE on Windows XP.[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    Listen 443[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]</IfModule>[/FONT][/COLOR]
    
    [COLOR=#333333][FONT=Lucida Console]<IfModule mod_gnutls.c>[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]    Listen 443[/FONT][/COLOR]
    [COLOR=#333333][FONT=Lucida Console]</IfModule>[/FONT][/COLOR]
    Code (markup):
    I think every config file is the original one, so, it's strange...
     
    Miguelmmm, Sep 28, 2012 IP
  4. Miguelmmm

    Miguelmmm Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Help, please? :S
     
    Miguelmmm, Oct 5, 2012 IP