WAMP: Cannot Connect To Localhost - apache

I'm just stuck on one little thing here but here is what I've done so far using websites and video tutorials (Note: I'm Running on Windows 10 and using Microsoft Edge as a browser for WAMP).
Disabled Skype
I went into the little WAMP menu/apache/httpd.conf and changed LISTEN
to port 81.
It still said port 80 was being used by Windows IIS 10.0 so I went into the Command Prompt as admin and used "iisreset /stop". Now WAMP is green and online, yay.
I enter localhost at the top of the WAMP menu and it brings me to a webpage saying "Make sure you’ve got the right URL: http://localhost".
I have gone into (C:)/Wamp/www and changed a line of code in "index" to $suppress_localhost = false;. Nothing changed.
Now I'm in (C:)/Windows/System32/drivers/etc and editing the "hosts" file. The edit is simply uncommenting my ip address which will supposedly reveal where WAMP should be going. It will not allow me to save it unless I give myself full control which is done by right clicking the file and selecting properties. However, when I try to save the file it fails and says "Please check if this file is open in another program". This is what I am stuck on.
Does anyone know how to check what other programs are using this file or is there another method of connecting to localhost to WAMP?
Thanks in advance!

First return Apache's listening port to 80.
Doing this "iisreset /stop" will only stop IIS until the next reboot. So it is better to uninstall IIS completely if you are not using it.
This I enter localhost at the top of the WAMP menu and it brings me to a webpage saying "Make sure you’ve got the right URL is probably due to the fact that there is more than once place where you need to change the listening port in apache, so when you put it back to
Listen 0.0.0.0:80
Listen [::0]:80
This will probably go away
SKYPE: You can configure SKYPE to not use port 80 or 443, but as far as I know you cannot do this to the tiles SKYPE, so uninstall that and then install the SKYPE App (from the SKYPE website). This can be reconfigured like this :-
Start SKYPE,
Menu Tools -> Options -> Advanced -> Connection
On this dialog, Uncheck the checkbox labeled
Use port 80 and 443 for additional incoming connections
and add a number to the `use port` field, something like `33333`
SKYPE should no longer attempt to use port 80.
The HOSTS file is protected by Windows, and possibly your Anti Virus also tried to protect it. To amend the HOSTS file you have to elavate your privilages to Administrator, and before you say you are, you are not. Start a command windows using the "Run as Administrator" option.
CD into C:\windows\system32\drivers\etc
run notepad hosts
Make your changes and save them
Host file should contain at least
127.0.0.1 localhost
::1 localhost

Related

Wampserver did not work on localhost

I just installed Wampserver. after installing it, the icon color is green and say the server is online. then I tried localhost on my browser. it showed "the site can't be reach" but when I entered http://127.0.0.1/ it works and displays Wampserver homepage. Why it did not work when I entered "localhost"? it only can enter http://127.0.0.1/ . Is there something that I must change in the settings? when I tried to change the port be port 80, it showed "CLI stop working".
localhost does not exists automatically. Its actually a domain name you have to create on your PC. You do this by adding it to your HOSTS file.
Edit the file C:\windows\system32\drivers\etc\hosts
Add these lines to it
localhost 127.0.0.1
localhost ::1
You also need the ::1 version as well as that is IPV6, and lots of browsers will attempt to use the IPV6 network in preference to the IPV4 (127.0.0.1)
You will have to be an Administrator to edit this file as it is protected by windows.
Or open your editor by right clicking on it, and selecting the "Run as Administrator" menu option.

Xampp gives error while starting Apache HTTPd

Apache shutdown unexpectedly. This may be due to a blocked port,
missing dependencies, improper privileges, a crash, or a shutdown by
another method. Press the Logs button to view error logs and check the
Windows Event Viewer for more clues If you need more help, copy and
post this entire log window on the forums
I found that there was nothing in the logs, and the advice to go to the xampp root with a cmd and run apache_start.bat actually got the error (a missing path in the .conf file) which didn't show up any other way.
All working now.
If this is a fresh install, rather than using the control panel to start Apache, you may want to go to XAMPP's root directory and call apache-start.
In my case, apache was failing to start due to a configuration error
httpd.exe: Syntax error on line 37 of C:/..../xampp/apache/conf/httpd.conf:
ServerRoot must be a valid directory
If that's the case, make sure that you run setup_xampp (Thanks to https://stackoverflow.com/a/17978400/239408 !)
Most likely you have blocked port 80. The most common problem is skype, change skype settings to use a different port, and restart.
Then run apache.
IF you encounter this kind of error in XAMPP
"This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums"
1) First thing you do is click the Netstat on the Xampp (it will give you the list of names, ports, address and PID)
2) Find the Port 80 and Check the Name who uses the port. for Example [httpd.exe]
3) Then go to the window task manager and click the processes
4) Find the Name of the application who uses the port. click the name and click end process
5) then back to the Xampp and click Start
Right click on Xampp Control Panel, and click on 'Run as Administrator'
That solved my problem.
I previously installed my XAMMP on one of my usb keys. Windows exchanged inadvertently their drive letters, making all my paths wrong in my XAMMP setup files. I changed back manually the drive letter of one key (before replugging the other one into my pc) so everything is ok again.
Hope this was helpfull.
JoVD.
As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.
As the port is not used by Skype, but by some other internal applications, I followed the below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80
And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080/1
Still from the httpd.conf file, I found another line that says:
ServerName localhost:80
And change 80 to 8080/1.
ServerName localhost:8080
Step 2 - From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says
Listen 443
And change the 443 into any number / port you want. I’ll using 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
ServerName localhost:443
And change 443 to 4433.
ServerName localhost:4433
Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.

How to solve "Error: Apache shutdown unexpectedly"?

I've just re-installed XAMPP, and when I try to start my Apache server in the XAMPP Control Panel, I now get the following errors:
16:50:25 [Apache] Status change detected: running
16:50:26 [Apache] Status change detected: stopped
16:50:26 [Apache] Error: Apache shutdown unexpectedly.
16:50:26 [Apache] This may be due to a blocked port, missing dependencies,
16:50:26 [Apache] improper privileges, a crash, or a shutdown by another method.
16:50:26 [Apache] Press the Logs button to view error logs and check
16:50:26 [Apache] the Windows Event Viewer for more clues
16:50:26 [Apache] If you need more help, copy and post this
16:50:26 [Apache] entire log window on the forums
How do I solve this?
As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.
As the port is not used by Skype, but by some other internal applications,
I followed the below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80
And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080
Still from the httpd.conf file, I found another line that says:
ServerName localhost:80
Change 80 to 8080.
ServerName localhost:8080
Step 2 - From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says
Listen 443
And change the 443 into any number / port you want. I’ll using 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
<VirtualHost _default_:443>
ServerName localhost:443
And change 443 to 4433.
<VirtualHost _default_:4433>
ServerName localhost:4433
Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.
Open Skype.
Tools -> Options -> Advanced -> Connection.
Uncheck the "Use port 80 and 443 for alternatives for incoming connections" checkbox
Sign Out and Close all Skype windows. Try restarting your Apache.
In XAMPP Control Panel V3.2.1, click on "NetStat" button on top right. Make sure port 80 is not used by any other program. Then click on "Shell" Right below it. Issue this command in the shell prompt;
Apache_Start.bat
or type "ap" then tab the TAB key two times which will similarly generate the above command.
You will actually see the exact error why Apache failed. It will be mostly likely virtual host configuration issue or may be something else. It will display the line number on which the error is occurring. Just fix that error. Note that in RootDocument a trailing \ can be a source of error as well. Remove any trailing "".
One thing you can do is to stop the services on port 80 by issuing
net stop http
in a cmd. You'll be asked if you're sure you want to stop those services. I found out that I had a few services I wasn't using and disabled them.
To see who else is using port 80 type in a cmd
netstat -abno
I'm assuming you want to run Apache on port 80. If this is the case and you want to keep the conflicting services you will need to associate them to a new port.
If the problem is not a busy port you can also try the following: select "show debug information" in the XAMPP config panel. When starting Apache you'll be shown something like "Executing "c:\xampp\apache\bin\httpd.exe". If you run that
c:\xampp\apache\bin\httpd.exe
in a cmd you will get some more information (I once for instance had some issue with my httpd.conf file).
Related: How do I free my port 80 on localhost Windows? and Apache won't run in xampp
Follow these steps:
Open your XAMPP control panel then click its "Config"
Choose the "Apache (httpd.conf)" and find this code below and change it into this one:
#Change this to Listen on specific IP addresses as shown below
#to prevent Apache from glomming onto all bound IP addresses.
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
# Dynamic Shared Object (DSO) Support
Save it (Ctrl + S)
After that, go back to the XAMPP control panel and click its config again.
Choose "Apache (httpd-ssl.conf)", find this code below, and change it again:
# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
#Listen 0.0.0.0:443
#Listen [::]:443
Listen 443
Save it (Ctrl + S)
Then, click the "config" (note: above the netstat) and click the "service and port settings".
Change "Main Port" to 8080 and "SSL Port" to 4433, then save it.
Finally, go to the "control panel" -> "Programs & Features" -> "Turn Windows On or Off".
Uncheck your "Internet Information Services", and then click OK.
Just wait for it and your computer/laptop will be automatically restart and try to open your XAMPP control panel again, and then start your Apache.
My problem was that in httpd.conf the DocumentRoot and <Directory> entries were pointing to non-existing folders.
For example, the 'original' httpd.conf had the following entries:
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
If you've installed in C:\xampp then you need to change those entries to match, i.e.
DocumentRoot "c:/xampp/htdocs"
<Directory "c:/xampp/htdocs">
This worked for me...
If you are using windows...
Search 'cmd' in the windows search bar.
Enter this:C:\xampp\apache\bin\httpd.exe
Find which file and which line the error occurred.
For example, mine was in the file below
on line 37.
httpd-multilang-errordoc.conf
Open the code and fix the error by either removing the line or fixing it.
Done! I should work now.
:)
If you're using Windows 7 . Search for IIS in Windows search (Click the Window icon in left bottom and type in where it says 'Search program and files') .
Open IIS (Internet Information Service) .
In the right side in actions panel. Click Stop.
Note: The stop link is faded in screen shot. As I've stopped it.
Problem Solved!
I had the same issue, and it turns out I forgot to run setup_xampp.bat (portable version).
It seems that no one has answered about executing xampp_start.exe.
I did all the previous answers but it did not fixed my issue. I found out that running xampp_start.exe will give you a detailed info about the issue.
This is what I see on my end:
As you can see I was having a path issue or xampp is pointing to non-existing folder.
When I found that there was no process using port 80 by using commands
netstat -abno | find ":80"
there was not a problem of any process using port 80.
Then I ran command (in cmd)
C:\xampp\apache\bin\httpd.exe
it showed some error in the virtual hosts configuration in httpd-vhosts.conf file which was recently edited by me for installation in a WordPress PHP environment in the Eclipse IDE. So I deleted those lines and Apache started perfectly.
The simple thing that you can do is to check if Skype or VMware is installed in your machine or not.
Skype uses port 80 and 443 as an additional port for incoming connections. To change the port number in Skype, go to
Tools > Connection Options > Connection
in the Skype window. Now change the default 80 port number to something other.
VMware Workstation uses port 443 for sharing. To change this, open VMware Workstation and goto
Edit > Preferences > Shared Vms
Click "Change Settings" buton
Then Click "Disable Sharing"
Then change the https port number being used (443)
Then you can click "Enable Sharing" button
That's all you have to do. Restart XAMPP and run the Apache server.
I had the same problem sometime back. I had a old laptop, on which almost all the ports were either blocked or were malfunctioning. This is how I did it.
Open the XAMPP control panel.
Click on Config
Then, go into Apache httpd.conf file. Open it with a text editor.
Search for "80" (Do Ctrl + F and find all of them. Replace it with 8080 or 4040 or 4000).
Save the file. And restart XAMPP.
It worked well for me, and I hope it helps you too.
For me, world wide web publishing-service was using port 80. I killed this by running the following command on cmd:
net stop http
After that, XAMPP ran Apache without any problems.
One of the causes could be that you are not running the XAMPP Control Panel as an administrator.
This error occurs because the port, which is allocated for Apache, is used by another program. To check the application which uses the port, which we allocated for Apache, it can be had by clicking,
Netstat button.
This is the Netstat file,
At first, I have allocated port 8080 for Apache, and I recently installed Oracle DB.TNSLSNR.exe has used 8080 port now.
So, by looking at this file we can choose a port which is not clashing with other applications. In my case, port 8060 is not clashing with any application. By selecting that we can change the httpd.conf file (XAMPP control panel -> Config) as mentioned above.
download new xampp apachefriends
install it
remove all VPN app
open folder XAMPP run setup_xampp.bat
run xampp-control.exe
Sometimes the issue is not a port issue but may be due to a misconfiguration that you did and Apache is not logging the error on the Event Viewer in Windows. To go around this, simply
cd C:\xampp\apache\bin
and then run
httpd.exe
Apache will then spit out the error for you e.g. as below
AH00526: Syntax error on line 2 of C:/xampp/apache/conf/httpd.conf: Invalid command 'This', perhaps misspelled or defined by a module not included in the server configuration
I hope that helps some poor soul :)
In my case, this issue was caused by an attempt to download other product of bitnami, like WordPress. That's common when we install WordPress via XAMPP. It is placed in the xampp/app directory that can be accessed from the XAMPP application homepage.
As a solution, I removed the default installed WordPress from the xampp directory and manually installed WordPress in the htdocs folder of WordPress by downloading it and extracting zip files into the htdoc folder. You also need to restart XAMPP or may system after uninstalling/removing the default WordPress. All is OK for me now.
Make at first sure your \xampp folder is in the root! This is important as the path is relative.
Then make sure you run the xampp_control.exe with admin rights.
Then change the files below to avoid issues with blocked port 80.
In \xampp\xampp-control.ini it should be set:
[ServicePorts]
Apache=8080
ApacheSSL=4433
Find \xampp\apache\conf\httpd.conf and set:
Listen 8080
ServerName localhost:8080
Find \xampp\apache\conf\extra\httpd-ssl.conf and set:
Listen 4433
<VirtualHost _default_:4433>
ServerName www.example.com:4433
Then end all services and restart xampp-control.exe with admin rights. It should run!
I have just encountered this error on my xampp v3.2.2 [win 10 pro x64],
I first tried to run the "net stop http" command in an admin cmd, but it didnt solve the issue, so I went ahead to try the "netstat -abno" command and i found out that the ssl port(443) was in use by vmware.
so my advice, don't just look for what's blocking port 80, also look for potential programs using port 443. because I really don't like changing my default port numbers to 8081 and 4433.
So this is how you can solve this issue...
firstly type the following command
net stop http
then try to start apache, if it still doesn't work. type out the following command
netstat -abno
and you'll definitely get that troublesome app that's using up your precious port.
copy the pid and then use the following command
taskkill /f /pid PID
where PID is the pid you copied.
Hopefully this helps someone.
In my case port was already used by windows IIS service.
You can check if port is being already used from cmd. Open cmd and run this command:
netstat -ano
If it is being used by IIS you can stop it by following command. Open cmd as administrator, then:
iisreset /stop
Now try running XAMPP, it should work.
You can run apache_start.bat file from XAMPP directory for see details about your error details.
Try the following, none of the above solved it for me
Select "Run as administrator"
Then click on the big left box next to Apache
And Choose to uninstall Apache
I have no idea why this worked but it solved my problem directly!
Step 1: In Apache go to Config then select Apache(httpd.conf)
In the notepad, find Listen 80 and add another 80 to change the port to become Listen 8080
Make sure to save before closing the notepad.
Step 2: In Apache go to Config the select Apache(httpd-ssl.conf)
In the notepad, find Listen 443 and add another 3 after 443 to change the port to become Listen 4433
Then search for VirtualHost default:443 and add another 3 to change the port to become VirtualHost default:4433
Make sure to save before closing the notepad.
(Note: There is a similar answer here but it did not work for me until I fond a video on YT)
I solved the problem with stopping the service "Web Deployment Agent Service". Open: System -> Computer Management -> Services -> Web Deployment Agent Service. Stop this service and starting XAMPP works.
I think this is a service by MS Webmatrix.
(German: Systemsteuerung -> System und Sicherheit -> Verwaltung -> Dienste -> Webbereitstellungs-Agent-Dienst)
Best solution
open XAMPP control panel,click on config for Apache, then click on Apache(httpd.config).now in the text editor . ctrl+f --> find "Listen 80" and replace it with "Listen 8079" wtihout the quotations :)
but now you have to use it like this http://localhost:8079/
P.S, I tried to change port settings for skype , stopping the Web Deployment Agent Service which I could not find in windows 10,cmd--> net stop http, and other methods but nothing worked except this .
I had the exact same error message as the OP, but my problem was not addressed by any of the existing answers. Many of the answers deal with conflicts on port 80, which I knew I did not have, since I had had localhost responding on port 80 very recently.
Turns out I had inadvertently changed ServerRoot when I intended to change DocumentRoot (stupid, I know), and though the new ServerRoot directory existed, it did not contain the configuration files and other stuff apache needed, which caused it to fail on startup. The error message probably addresses this scenario by the wording 'missing dependencies'.
On my Windows system, setting ServerRoot back to C:/XAMPP/apache solved the problem.
The Apache server by default runs on ports 80, 443. Your problem is one or both of the two ports are busy. Usually Skype or VMware Workstation use these two ports. So, make sure that they're not running. The best way to make sure the ports are free on windows is :
Click windows button.
In the search bar type resmon, to open the resource monitor resmon.exe.
Open Listening Ports, this will show you the opened used ports.
Now you can see which process is using ports 80 and 443.
Then you can kill the process either from CMD using its PID (which is shown in the resource monitor), or directly from Task Manager.
To kill a process from CMD using PID type Taskkill /PID 26356 /F, where 26356 is the PID.
Best Solution for windows user is :
Open netstat (from XAMPP CONTROL PANEL)
Find PID of process which uses port 80.
Open CMD with Administrative.
Run taskkill /pid PID (instead PID use pid u found from netstat)
Heyy enjoy u Done.....

Unable to start Apache in XAMPP

I have downloaded xampp-win32-1.7.7-usb-lite.7z and unzip it to C drive in my VirtualBox. Then i tried to start Apache through xampp-control.exe. when i press Start button in-front of Apache label, apache started port 80 display in text area in that window. but nothing happen. Start button not change to stop. but mysql is start properly. how could i start Apache ?
Try ZendServer CE, it works great in a Virtual Box. Apache gives problem inside a Virtual Box.
You can also refer this post: Apache won't start in VirtualBox
Try to Restart Xampp from the option Explore
Xampp Contorl-> Explore-> Xampp-Restart
If you have other service installed like .NET SQL Server it may block xampp
Xampp Contorl-> SCM -> SQL server-> Manual from Automatic
Xampp Control-> SCM-> Web client->Disabled
If you like to run service always Check SVC for both Apache Mysql It will ask you to install service click YES to install
Finally Restart your machine
i don't know whether your issue is resolved or not,if not please try the below mentioned cases
1.if your Skype account is logged in,please log out from that(usuall skype uses default Ports numbers 80 and 443 )
2.check whether any other application is running on the port 80,if so please change that port number to other.to see that from a command prompt, run netstat -a. This will output a list of ports that are currently running.
(how to change the default port number is open your httpd.conf file and search for localhost you will find 80 there and change that to your desired number)
i think these are the main cases so please go through this cases also..

XAMPP PORT 80 is Busy / EasyPHP error in Apache configuration file:

This problem has completely shot my entire day. I reformatted my old windows XP comp and tried installing XAMPP only to find that when i try to start Apache xampp claims port 80 is busy....WHAT DOES THAT EVEN MEAN?
So I tried just uninstalling and moving to EasyPHP instead and when I installed that I get the error "error in Apache configuration file: the system cannot execute the specified program"
No, I do not have Skype or any other programs really for that matter at this point, like I said I JUST REFORMATTED so idk whats going on.
I would love to get this fixed, but if you leave me a answer please be specific on directions bc I'm only programming, never been to big on IT and playing with command lines and what not for me isn't to much fun.
Things to be done to free port 80:
check if skype is running, exit from skype
check services.msc if web deployment agent service is running
check if IIS is running, stop it.
Once you start apache, you can sign into skype.
Only one process can use port 80 at a time. Port 80 is the default port for web servers, so when you navigate to websites over HTTP, you are actually navigating to that server's port 80 by default (when you use HTTPS, the port is 443).
You can try to hunt down all the programs that are running on port 80, but there's an easier way that will work for development. When running XAMPP, click "Config" under "Apache". Replace Listen 80 with Listen 8080 and ServerName localhost:80 to ServerName localhost:8080.
Then, when you want to look at your masterpiece, navigate to http://localhost:8080 in your browser.
SQL Server Reporting Services (SSRS) SSRS can remain active even if you uninstall SQL Server.
To stop the service:
Open SQL Server Configuration Manager.
Select “SQL Server Services” in the left-hand pane.
Double-click “SQL Server Reporting Services”.
Hit Stop.
Switch to the Service tab and set the Start Mode to “Manual”.
Skype
Irritatingly, Skype can switch to port 80. To disable it, select Tools > Options > Advanced > Connection then uncheck “Use port 80 and 443 as alternatives for incoming connections”.
IIS (Microsoft Internet Information Server)
For Windows 7 (or vista) its the most likely culprit. You can stop the service from the command line.
Open command line cmd.exe and type:
net stop was /y
For older versions of Windows type:
net stop iisadmin /y
Other
If this does not solve the problem further detective work is necessary if IIS, SSRS and Skype are not to blame. Enter the following on the command line:
netstat -ao
The active TCP addresses and ports will be listed. Locate the line with local address “0.0.0.0:80″ and note the PID value. Start Task Manager. Navigate to the Processes tab and, if necessary, click View > Select Columns to ensure “PID (Process Identifier)” is checked. You can now locate the PID you noted above. The description and properties should help you determine which application is using the port.
Run this in command prompt:
netstat -ano | find ":80"
It will show you what process (PID) is listening on port 80.
From there you can open task manager, make sure you have PID selected in columns view option, and find the matching PID to find what process it is.
If its svchost.exe you'll have to dig more (see tasklist /svc).
I had this happen to me recently and it wasn't any of the popular answers like Skype either, could be Adobe, Java, anything really.
Port 80 might be busy with other application like IIS. If you don't want to stop it, you can change the apache port. Here is the way..
go to the C:\xampp\apache\conf (directory where you installed xampp). Now, locate the httpd.conf.
Open it with any text editor (like notepad) and go the line that says Listen 80
Change this with any other port (like Listen 1234)
Save the file. Restart the server and go ahead.
xampp port 80 is busy when some other application is using the same port at that time. This can be solved by using one of the following methods:
Detect the application which is using the port 80 and close it.
This one is more efficient. xampp installs apache server with default port 80. So, you can change this port manually to any number.
Just find the httpd.conf file in xampp installation and replace the following line of code.
#Listen 12.34.56.78:1234
Listen 80
to any port number of your choice. Here, i have taken 8000.
#Listen 12.34.56.78:1234
Listen 8000
Find the following code in the same file httpd.conf
ServerName localhost
Replace with the following, take the same number you have used in upper code.
ServerName localhost:8000
For detailed answer, check http://webolute.com/blog/programming/this-may-be-due-to-a-blocked-port-missing-dependencies
Just do one thing
open skype > tools > advance or advance settings Change port 80 to something else 7395
Restart your system then start Apache
I've found that the biggest culprit for taking up port 80 on newer Windows installs is the BranchCache Service (#3) in this list...
SQL Server Reporting Services
Web Deployment Agent Service
BranchCache
World Wide Web Publishing Service
These 4 service probably cover 90% of the native Windows Services that take up port 80.
The other 10% is the hidden HTTP.sys service/driver which takes port 80 when another service requests it. Run this to disable it, and reboot.
sc config http start= disabled
Aside from Skype, TeamViewer is also very commonly installed software, and will take port 80 if not configured otherwise.
List taken from: Opening Up Port 80 For Apache to Use On Windows
If you are running VMWare Workstation , you need to stop the VmWare Workstation server - port 443 as well
So I have faced the same problem when trying to start apache service and I would like to share my solutions with you.
Here is some notes about services or programs that may use port 80:
Skype: skype uses port 80/443 by default. You can change this from tools->options->
advanced->connections and uncheck the checkbox "use port 80 and 443 for addtional incoming connections".
IIS: IIS uses port 80 be default so you need to shut down it. You can use the following two commands
net stop w3svc
net stop iisadmin
SQL Server Reporting Service: You need to stop this service because it may take port 80 if IIS is not running. Go to local services and stop it.
These options work great with me and I can start apache service without errors.
The other option is to change apache listen port from httpd.conf and set another port number.
Hope this solution helps anyone who face the same problem again.
This happens because some other programs running in your system is using the default port 80 used for http service by apache server in xampp/easy php.
Some programs like skype usually use port 80.
so find such program and remove it ...
For finding programs listening port 80 refer Port 80 listening programs
Try finding the Service running on the PID that is blocking the service from Task manager->Services
In case this isn't of help go to Task Manager->Services
Go to the Services button on bottom right of window and stop the Web Deployment Agent Service. Retry starting Apache . That might solve the problem.
This problem is because port 80 is used by some other application. Try to reconfigure port.