1

After installing WAMP server 2.5 on Server 2012 R2 I tried to run it but it just said this

Your port 80 is actually used by : 
Server: Microsoft-HTTPAPI/2.0

I've look at every post I can find about this, there's no Web Deployment service running, IIS isn't even installed.

This is what I got from netsh http show urlacl

URL Reservations:
-----------------

Reserved URL            : http://+:80/Temporary_Listen_Addresses/
    User: \Everyone
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;WD)

Reserved URL            : https://+:5986/wsman/
    User: NT SERVICE\WinRM
        Listen: Yes
        Delegate: No
    User: NT SERVICE\Wecsvc
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970)(A;;GX;;;S-1-5-80-4059739203-877974739-1245631912-527174227-2996563517)

Reserved URL            : http://+:47001/wsman/
    User: NT SERVICE\WinRM
        Listen: Yes
        Delegate: No
    User: NT SERVICE\Wecsvc
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970)(A;;GX;;;S-1-5-80-4059739203-877974739-1245631912-527174227-2996563517)

Reserved URL            : http://*:2869/
    User: NT AUTHORITY\LOCAL SERVICE
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;LS)

Reserved URL            : http://*:5357/
    User: BUILTIN\Users
        Listen: Yes
        Delegate: No
    User: NT AUTHORITY\LOCAL SERVICE
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;BU)(A;;GX;;;LS)

Reserved URL            : https://*:5358/
    User: BUILTIN\Users
        Listen: Yes
        Delegate: No
    User: NT AUTHORITY\LOCAL SERVICE
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;BU)(A;;GX;;;LS)

Reserved URL            : https://+:443/sra_{BA195980-CD49-458b-9E23-C84EE0ADCD75}/
    User: NT SERVICE\SstpSvc
        Listen: Yes
        Delegate: Yes
    User: BUILTIN\Administrators
        Listen: No
        Delegate: No
    User: NT AUTHORITY\SYSTEM
        Listen: Yes
        Delegate: Yes
        SDDL: D:(A;;GA;;;S-1-5-80-3435701886-799518250-3791383489-3228296122-2938884314)(A;;GR;;;BA)(A;;GA;;;SY)

Reserved URL            : http://+:80/0131501b-d67f-491b-9a40-c4bf27bcb4d4/
    User: NT AUTHORITY\NETWORK SERVICE
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;NS)

Reserved URL            : https://+:443/C574AC30-5794-4AEE-B1BB-6651C5315029/
    User: NT AUTHORITY\NETWORK SERVICE
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;NS)

Reserved URL            : http://+:80/116B50EB-ECE2-41ac-8429-9F9E963361B7/
    User: NT AUTHORITY\NETWORK SERVICE
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;NS)

Reserved URL            : http://*:8989/
    User: \Everyone
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;WD)

Reserved URL            : http://+:5985/wsman/
    User: NT SERVICE\WinRM
        Listen: Yes
        Delegate: No
    User: NT SERVICE\Wecsvc
        Listen: Yes
        Delegate: No
        SDDL: D:(A;;GX;;;S-1-5-80-569256582-2953403351-2909559716-1301513147-412116970)(A;;GX;;;S-1-5-80-4059739203-877974739-1245631912-527174227-2996563517)

Any ideas anyone?

Edit: I've also just just noticed that when I go to localhost in my browser it shows a 404, which would surely mean that there's something there? As when I navigate to localhost on a different computer, with nothing running on port 80, it says it can't connect. Not sure how useful this is as it may already be obvious but I thought it was worth adding anyway.

Raf
  • 43

3 Answers3

3

WAMP on Server 2012 - port 80 is used by Server : Microsoft HTTPAPI/2.0 [Solved] 03-20-2015, 03:45 AM I didn't see this documented anywhere else so I thought I would document it here.

We wanted to run the Apache web server on a new Windows Server 2012 R2 install.

The Apache service wouldn't start because TCP/IP port 80 was in use.

The error was, Port 80 is used by "Server : Microsoft HTTPAPI/2.0".

The obvious thing was to disable the IIS web server, which can also use port 80. But this didn't solve the problem.

It turns out there are a long list of other services that can also use Port 80: These include the following services:

  • SQL Server Reporting Services
  • World Wide Web Publishing Service
  • Web Deployment Agent Service
  • Branch Cache Service (<== This was the important one for us, and also the one that is least documented)

https://www.passmark.com/forum/general/5273-wamp-on-server-2012-port-80-is-used-by-server-microsoft-httpapi-2-0-solved

0

I found that I was running without virtual hosts and didn't want them

So I disabled & changed the httpd-vhosts.conf to Require all granted

VirtualHost configuration:

Default server: localhost

*** WARNING: No VirtualHost defined

================== COMPLETE RESULT ================== VirtualHost configuration: *:80 localhost (C:/wamp/bin/apache/apache2.4.18/conf/extra/httpd-vhosts.conf:5)

commented line 180

LoadModule vhost_alias_module modules/mod_vhost_alias.so

comment line 512

Virtual hosts

Include conf/extra/httpd-vhosts.conf

#

Virtual Hosts

#

ServerName localhost DocumentRoot c:/wamp/www

    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local

#

Virtual Hosts

#

ServerName localhost DocumentRoot c:/wamp/www

    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require all granted

Now this worked for me - but I just want to ask if this is going to cause a security issue I'm not seeing.

0

The first step is identifying which process is listening on a specific port, for example with the port 80, below command can be used to find the related process ID:

netstat -ano | findstr :80

A response might look like below:

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:8017           0.0.0.0:0              LISTENING       740
  TCP    0.0.0.0:8018           0.0.0.0:0              LISTENING       3100
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       4368
  TCP    [::]:8080              [::]:0                 LISTENING       4368

The process ID can be found in the most right column.

In my case, the process with ID 4 was listening on port 80, and process ID 4 belongs to SYSTEM.

I eventually found out that Active Directory Federation Services (ADFS) was the culprit and as I no longer needed the role, I removed it from the Roles and Features wizard and the problem was solved :)