wampserver port 80 - not working after windows update - apache

Things that are not installed/not using port 80:
IIS,
Web Deploy 2.0 (Web Deployment Agent Service),
MS Sql Server Reporting service,
BranchCache ( Windows 8.1 ),
SQL Server VSS Writer
Error:
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Your port 80 is used by a processus with PID = 4
The processus of PID 4 is 'System' Session: Services
The service of PID 4 for 'System' is 'N/A'
* ERROR * This service IS NOT from Wampserver - Should be: 'wampapache64'
I really would like to use port 80 since my project is uncompleted.
(tried using another port - 81 - but i guess my wamp mapping isnt correct. for example: localhost/shop opened my project but localhost:81/shop did not)
Any ideas are greatly appreciated!!!

I thought I would mention this is as a formal answer since it is probably going to bite a lot of people and is difficult to diagnose -- it appears that a recent update to the 'Razer Chroma SDK Server' service ties up port 80 via Process ID 4 'System'. This suddenly caused my XAMPP service to fail to start, and 'net stop http' command prompt command to fail. Stopping this service frees up the port.
I was getting paranoid about perhaps malware being the culprit, so thank you so much to 'Scriptus' and whoever else contributed to solving this mystery!

Related

How do I free port 80? [duplicate]

I installed XAMPP 1.6.8 and for some reason it didn't work. Later realized port 80 is not free or not listening. How can I release it or make it free?
Thanks a lot!
I found out that what was taking over port 80 is http api service. I wrote in cmd:
net stop http
Asked me "The following services will be stopped, do you want to continue?" Pressed y
It stopped a number of services actually.
Then wrote localhost and wallah, Apache is up and running on port 80.
Important: Skype uses port 80 by default, you can change this in skype options > advanced > connection - and uncheck "use port 80"
netstat -ano
That will show you the PID of the process that is listening on port 80.
After that, open the Task Manager -> Processes tab. From the View -> Select Columns menu, enable the PID column, and you will see the name of the process listening on port 80.
I had this problem previously,
if you see the Task manager(after enabling the view for PID), you will find PID=4 is "port 80 in use by NT Kernel & System; "
Just go to
Control Panel
Programs
Turn Windows features on/off
check if the World wide web services under IIS is checked
If so, Uncheck and netstat(or TCPVIEW) again to see if 80 is free.
netstat -a -b
Should tell you what program is bound to port 80
use netstat -bano in an elevated command prompt to see what apps are listening on which ports.
But Usually following applications uses port 80 in windows.
IIS
World Wide Web Publishing service
IIS Admin Service
SQL Server Reporting services
Web Deployment Agent Service
Stop above applications if running and check!!!
Use TcpView to find the process that listens to the port and close the process.
Other option to try is to stop SQL Server Reporting Services.
You can use net stop http it will display which process is using. Moslty world wide web services are using
Try
netstat -anb -p tcp
that show ports and processes
I was trying to install nginx from here - http://nginx.org/en/docs/windows.html
Going to http://localhost/ will show something, at least a proper "not found" message
This is because 80 is the default port, and it was taken by other processes.
Now run below command:
net stop http
// Above command stopped below services
// - SSDP Discovery
// - Print Spooler
// - BranchCache
// - Function Discovery Resource Publication
// - Function Discovery Provider Host
Now, going to http://localhost/ will fail with a broken link page message.
Main process was BranchCache
This process, after stopped, will restart in a few seconds.
So we need to run other commands we need soon, an example below:
// this will stop
net stop http
// immeidately run other command you want to
start nginx
Now, going to http://localhost/ gave me:
Welcome to nginx!
Hope that helps.
Type in "netstat -ano" into your command line. I saw that it was showing something for Local Address port 0.0.0.0:80.
My issue was because I had SQL Server Reporting Services on Port 80. So I followed these instructions and changed the port # from 80 to 81:
http://seankilleen.com/2012/11/how-to-stop-sql-server-reporting-services-from-using-port-80-on-your-server-field-notes/
Here is a picture of my command line AFTER I changed the port number for SQL Server Reporting Services:
If you are still having the same issue, read this forum:
http://forum.wampserver.com/read.php?2,66196,66233#REPLY
This is just a guess, but since port 80 is the conventional port for HTTP, you may have a webserver running on your system. Is IIS active?
If you are running IIS you may have the web farm service running. That was what was killing my xampp.
Skype likes to use port 80 and blocks IIS. That was my prob.
I also had the same problem. net stop http didn't help and World wide web services option under IIS in Windows Control Panel was unchecked. So in XAMPP control panel I just checked the Svc checkbox near Apache start button (Install Apache as service) and rebooted Windows. And now each time Windows starts Apache is started automatically and occupies port 80 before any other service does. Worked for me!
Known Windows Services That Listen on Port 80
From Services Manager (run: services.msc), stop and disable these Windows Services which are known to bind to port 80.
Double click Service, and change ‘Startup Type’ to ‘Disabled’…
SQL Server Reporting Services (ReportServer)
Web Deployment Agent Service (MsDepSvc)
BranchCache (PeerDistSvc)
Sync Share Service (SyncShareSvc)
World Wide Web Publishing Service (W3SVC)
Internet Information Server (WAS, IISADMIN)
skype also using port 80 as default setting and you can uncheck it.
You might, or might not, have some of these Services installed and running.
In my case "SQL Server Reporting Services" was opening port 80.
Identify the real process programmatically
(when the process ID is shown as 4)
The answers here, as usual, expect a level of interactivity.
The problem is when something is listening through HTTP.sys; then, the PID is always 4 and, as most people find, you need some tool to find the real owner.
Here's how to identify the offending process programmatically. No TcpView, etc (as good as those tools are). Does rely on netsh; but then, the problem is usually related to HTTP.sys.
$Uri = "http://127.0.0.1:8989" # for example
# Shows processes that have registered URLs with HTTP.sys
$QueueText = netsh http show servicestate view=requestq verbose=yes | Out-String
# Break into text chunks; discard the header
$Queues = $QueueText -split '(?<=\n)(?=Request queue name)' | Select-Object -Skip 1
# Find the chunk for the request queue listening on your URI
$Queue = #($Queues) -match [regex]::Escape($Uri -replace '/$')
if ($Queue.Count -eq 1)
{
# Will be null if could not pick out exactly one PID
$ProcessId = [string]$Queue -replace '(?s).*Process IDs:\s+' -replace '(?s)\s.*' -as [int]
if ($ProcessId)
{
Write-Verbose "Identified process $ProcessId as the HTTP listener. Killing..."
Stop-Process -Id $ProcessId -Confirm
}
}
Originally posted here: https://stackoverflow.com/a/65852847/6274530
I faced the same issue and fixed it by making a small change in the httpd.conf file which can be obtained by clicking the config button along with the Apache option.
The change I made was to replace listen 80 with listen 8080.
For me, this problem began when I hosted a VPN-connection on my Windows 8 computer.
Simply deleting the connection from "Control Panel\Network and Internet\Network Connections" solved the problem.

XAMPP,Apache - Error: Apache shutdown unexpectedly

I got the same error of shutdown unexpectedly. I tried everything.
I uninstalled skype.
I tried changing the ports to 81,444 / 81,443 / 88/443 / 80,443(default).
I went to services and tried killing required one.
I went to windows firewall and created the new inbound rule too.
I uninstalled old apache and installed new one too. This worked for 1 day.
I checked whether the port 80 is busy or not but none of the services is using port
80,443. I used netstat -a command to check all the list of port for Win-8.
I tried stopping windows http services by "NET STOP HTTP".
I unchecked "Internet Information Services" from program and features.
I checked "Resource Monitor" for port usage. Port 80 is being used by HTTP server only
but not responding to xampp control panel.
In all of the above cases, I made the changes and restarted the laptop every time to take the effect. But nothing has worked. Each time i got the same error i.e "XAMPP, Apache - Error: Apache shutdown unexpectedly".
Please give me the solution for this error. I am very much frustrated now. Please help me. Any help would be appreciable. Thank you in advance.
It would be good if you enable Apache Logs in debug mode.
LogLevel debug
Also you can get easily notified for syntax issues with help of below command.
httpd -t
For your skype, go to Tools -> Options -> Advanced -> connection. Disable the "Use port 80 and 443 for alternatives for incoming connections"
Sign Out and Close all Skype windows. Try restart your Apache again.

Succeeded installing but could not start apache 2.4 on my windows 7 system

I am attempting to install and run apache 2.4 on my windows 7 system
I went to the apache 2.4 bin directory and ran the following:
Note: I opened the cmd window as administrator.
C:\Apache24\bin>httpd.exe -k install
Its output was as follows:
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
So it installed apache 2.4 as a service but it could not be started. It seems like the localhost port 80 is being used. Is this what "[::]:80" means?
I then stopped both the the apache 2.0 service which I had left running and the mysql service, hoping stopping one of them might free up localhost port 80.
I also run netstat -o to see if port 80 is being used. It was not.
But, I then found that a process was using the above socket it is a process that is listening on the above socket
TCP [::]:80 User-PC:0 LISTENING 4
I then ran tasklist and found out that System is using pid 4. 4 is under the pid column
System 4 Services 0 544 K
Finally, from the failed attempt to start the service
I got an error which was recorded in windows systems events.
Log Name: System
Source: Service Control Manager
Date: 2/21/2013 1:58:03 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: User-PC
Description:
The Apache2.4 service terminated with service-specific error Incorrect function.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-02-21T18:58:03.723988900Z" />
<EventRecordID>87756</EventRecordID>
<Correlation />
<Execution ProcessID="560" ThreadID="7596" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">Apache2.4</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>
The error from the attempt to start says that beacause of lack of access, make-sock could not bind to sockets which to me looked like localhost port 80. For example,
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
Can anyone tell what I am doing wrong?
Sorry for the belabored question. To solve my problem I just told apache 2.4 to listen to a different port in httpd.conf. Since System was using pid 4 which was listening on port 80, I did not want to explore this any further.
I put the following into httpd.conf.
Listen 127.0.0.1:122
The most likely culprit is Microsoft Internet Information Server. You can stop the service from the command line on Windows 7/Vista:
net stop was /y
or XP:
net stop iisadmin /y
read this
http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
I have the same problem too, after upgrading win7 to win10.
then I check services.msc and found "World Wide Web Publishing Service" was running automatically by default.
So then I disabled it, and running the Apache service again.
Port 80 maybe used by Microsoft HTTPAPI
Try to stop the following service:
Web Deployment Agent Service
SQL Server Reporting Service
SQL Server VSS Writer
I solved this issue finally, it was because of some systems like skype and system processes take that port 80, you can make check using netstat -ao for port 80
Kindly find the following steps
After installing your Apache HTTP go to the bin folder using cmd
Install it as a service using httpd.exe -k install even when you see the error never mind
Now make sure the service is installed (even if not started) according to your os
Restart the system, then you will find the Apache service will be the first one to take the 80 port,
Congratulations the issue is solved.
In my case, it was due to an IP address that Apache is listening to. Previously I have set it to 192.168.10.6 and recently Apache service is not running. I noticed that due to My laptop wifi changed recently and new IP is different. After fixing the wifi IP to laptop previous IP, Apache service is running again without any error.
Also if you don't want to change wifi IP then remove/comment that hardcode IP in httpd.conf file to resolve conflict.
if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.
So, that is why i do a two (or more) post.
I was having the same problem when starting the service (logs can not be opened).
I thought it was because i was trying to have htdocs inside a VeraCrypt encripted container, absurd since i hace such contained mounted and i use a juntion to not affect paths.
The i read the cause could be low ram: after some tests i get to the next conclusion.
Windows is not sending pages to virtual ram to free enough ram if it is a service, for applications it is doing it, i have more than 200GiB of pagefile ready to be used as virtual ram in a 4GiB 64 Bit windows 10.
My solution:
Run a free utility that free ram (512MiB in my test)
Inmediatly after start the service, it starts with no errors
Real Cause:
I was using a virtual machine that uses 1/2 physical free ram (1.5GiB)
Hope this help others.
I was also facing the same issue, then i tried restarting my system after every change and it worked for me:
Uninstall Apache2.4 in cmd prompt (run administrator) with the command:
httpd -k uninstall.
Restart the system.
open cmd prompt (run administrator) with the command:
httpd -k install.
Then httpd -k install.
Hope you find useful.
you can solve it
sudo nano /etc/apache2/ports.conf
and changed Listen to 8080
This may be because of shortage in physical RAM.
Check minimum system requirements in the docs and try to close unnecessary programs if possible.

SelfSSL7 custom CN with a local development domain

I have my site mydomain.local on my local development machine, which uses a local hosts file entry to point to 127.0.0.1. The directory is my working git copy and it works like a charm. It always points to whatever I have checked out.
I want to setup SSL but of course need to test locally and with my code before I go implementing it elsewhere. This is my Win7 Ultimate machine and this dev environment uses full-blown IIS 7.5 and not any built-in IIS express or localhost:port# auto-config.
Through multiple experiments, I've resorted to SelfSSL7 for greater control and setup of a self-signed SSL certificate. It has a great set of options and seems to work well.
Accordingly to the limited docs, I generate my SelfSSL cert with this command:
SelfSSL7 /Q /T /I "mydomain.local" /S "MyDomain IIS Name" /N cn=pc_name;cn=localhost;cn=mydomain.local
It does properly bind to my IIS setup with the right domain. BUT when I try to start the Site,I get this error:
The process cannot access the file because it is being used by another process. (Exception 0x80070020)
I look up these errors and am instructed to check which services are listening on port 443 for SSL. This is a snippet of the output from my netstat -ano output (where port==443) (I've trimmed all else)
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 5800
TCP [::]:443 [::]:0 LISTENING 5800
Problem is that the documentation sucks (surprise) and I'm not sure where to go from here. The registry path they've specified does not actually exit on my machine (no ListenOnlyList folder in Regedit). Also, I have 0 other IIS sites setup and definitely none setup on SSL over 443.
SUMMARY: the SSL cert can be generated, looks right, but I cannot Start the site in IIS once it's binding is in place. Again, SSL looks right - maybe it's more about my machine config with regard to port 443 and "socket pooling" (???)
I had the same problem, in my case I just stoped the iss server, closed skype, and restarted the server and skype, it worked, it seems that skype was using port 443.
Looks like you already have a program listening on port 443. Use Task Manager or Process Explorer to check what program is running with Process ID 5800 and then kill that.

Apache service failing ("BUSY") when using port 80 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
How can I configure my Apache server to run on port 80? My Apache service is failing when using Port 80; it says BUSY.
When I change the port in config to 85, Apache works but this requires maunally entering 85 in the address bar every time with localhost.
I have tried to find out which program is using port 80 but I cannot come up with anything. I first entered netstat -n -a -o -p TCP in cmd and I came up with this information
Local Address 0.0.0.0:80 State: Listening PID: 4
Then I entered tasklist in cmd trying to figure out which service is using this port. Looks like "System" is on PID 4. I have configured Skype to not use port 80 without any luck. I have Microsoft WebMatrix installed on Windows 7 and I even deleted IIS 7.5 Server Express to free this port but all to no avail.
Can you guys please help me out? I am using Windows 7 and XAMPP.
Several programs can block that port. Candidates are:
Skype
Web Deployment Agent Service (can be stopped via Start -> [-> Run] -> services.msc)
World Wide Web Publishing Service
IIS (if you have it installed)
TeamViewer
VMware (in VMware Workstation go to Edit>>Preferences>>Shared VMs, and Disable Sharing or change the port)
Web Deployment Agent Service and World Wide Web Publishing Service can be set to manual start to keep them from running. Stop or change these services from an account that has administrator permissions.
Skype and TeamViewer can be configured not to use port 80.
For Skype Go to Options > Advanced > Connection and un-check "Use port 80 and 443 for incoming connections"
For TeamViewer Go to Extra > Options > Advanced and un-check the similar message as above.
EDIT: I made the post a community Wiki, so if people find other programs, they can add them here.
For me, it turned out to be that "Web Deployment Agent Service" was taking port 80. As soon as it was disabled apache started right up. I've also come across quite a few saying some of the SQL Server services were blocking it.
EDIT:
Just thought I'd add that the new MSN(Skype) causes this as well, using port 80 by default. It can be changed in the settings:
Tools > Options > Advanced > Connection > Untick "Use Port 80 and 443" > Save
You can also just change the port the Apache Web Server is using in the httpd.conf file.
In a Windows OS command prompt I use;
netstat -an
to see what services are already running, and what ports they are using, then just pick a port number that's not being used. Much simpler. That's for my Dev environment. On an actual server or in the cloud, I would run the Apache Web Server without conflicts and just shutdown anything else that happens to be using port 80.
I’m currently beta testing the next version of Windows, Windows 7 and came across a strange issue while trying to get Apache to install and run using the default port, 80.
Running the command ‘netstat -ano’ from the command line revealed
that port 80 is being used by PID 4.
Looking up PID 4 using Power Shell and then Task Manager revealed
that PID 4 is the NT Kernel!
So Windows 7 by default appears to be using port 80.
After a bit of hunting around the Internet and doing some research of my own I found that the service http.sys was the culprit and all I needed to do was disable it but I could not find this service listed in the Services control panel applet.
So what’s the solution?
You have to disable the http.sys service manually via the registry:
1) Launch RegEdit:
2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP
3) Add a new DWORD (32-bit) value
4) Name it ‘NoRun’ not including the quotes
5) Double click the new property
6) In the Value data field type ’1′ not including quotes and click OK
7) Re-boot your computer
You should now find that Apache will start on port 80!
Oh, thank you a thousand times. I've been wrestling all day with getting port 80 free. Tried everything that I found on the chat rooms, forums, including the regex edit above, and still there was:
netstat -ano -p tcp | findstr LISTENING
TCP 0.0.0.0:80 0.0.0.0 LISTENING 4
TCP 0.0.0.0:445 0.0.0.0 LISTENING 4 etc.
Now port 80 has disappeared from the display. What a relief!
Just thought I would put my input in:
I stopped service MsDepSvc (AKA: Web Deployment Agent Service) and this solved the issue.