which port is proper to start apache except port:80? - apache

I've just installed XAMPP. Apache doesn't start because of the blocked ports.I deactivated apps and services which use port 80 but it didn't work. at last, I set it to listen on port :8080 ( through httpd.conf) but it still repeated that error:
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
now I guess i may set it to another port but dont know which?

Related

XAMPP - Port 80 in use by "Unable to open process" with PID 12448

I got this problem, and I can't find the solution on web
21:51:01 [Apache] Problem detected!
21:51:01 [Apache] Port 80 in use by "Unable to open process" with PID 12448!
21:51:01 [Apache] Apache WILL NOT start without the configured ports free!
21:51:01 [Apache] You need to uninstall/disable/reconfigure the blocking application
21:51:01 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
21:51:01 [Apache] Problem detected!
21:51:01 [Apache] Port 443 in use by "Unable to open process" with PID 12448!
21:51:01 [Apache] Apache WILL NOT start without the configured ports free!
21:51:01 [Apache] You need to uninstall/disable/reconfigure the blocking application
21:51:01 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
21:51:01 [Apache] Attempting to start Apache app...
21:51:02 [Apache] Status change detected: running
21:51:03 [Apache] Status change detected: stopped
21:51:03 [Apache] Error: Apache shutdown unexpectedly.
21:51:03 [Apache] This may be due to a blocked port, missing dependencies,
21:51:03 [Apache] improper privileges, a crash, or a shutdown by another method.
21:51:03 [Apache] Press the Logs button to view error logs and check
21:51:03 [Apache] the Windows Event Viewer for more clues
21:51:03 [Apache] If you need more help, copy and post this
21:51:03 [Apache] entire log window on the forums
Its PID 12448, not PID 4 !!! How to solve it ?
P.S
It's no problem after just download the xampp, then I install Joomla! and get this problem...
In addition to the things to fix mentioned by RepeaterCreeper, on a windows machine you can find the application (executable) by process id:
netstat -a -b -o
tasklist | findstr /C:"<pid>"
The first command will list all the processes, PIDs, associated process executable name. The second command will find the executable name by PID
More help on usage:
netstat /?
tasklist /?
To save the results to a file for the commands, use "> file.txt" switch. E.g.:
tasklist | findstr /C:"2342" > t.txt
The above command will save the output to a file named "t.txt" in current folder. Stop those processes if possible. Or else, configure XAMPP to use a different port in the configuration dialog.
Okay so the problem is that port 80 is by default being used by a service that is installed by default into Windows 10. So what you need to do is turn that off. I'll go over them step by step on how to do this down below.
Press Window + R.
Type in the run box "services.msc".
Now scroll down near the bottom you will see "World Wide Web ... " (I don't know the fully name so just look for something like 'World Wide Web').
Now you'll see that it is set on AUTOMATIC as the startup type or whatever it was. Double click or right click and you will see a dialog box pop up.
Press the STOP button to turn off the service.
OPTIONAL
Change it to MANUAL as the startup type.
Now that's out of the way restart your computer if necessary (But I think you don't need it, however I would recommend it since I'm not sure whether it needs to be restarted or not). And once you've done that run XAMPP as an administrator by simply right clicking and pressing Run as Administrator and that should work. If it doesn't then I don't know how to help you. That was the way I did it when I was having this problem.
NOTE: Skype may also be a problem as pointed out in the comments. If you have skype please following the following.
Open up Skype.
Go to Options
Go to Connections
Then you'll see a check-box that is labeled "Use Port 80 or 443 as an alternative for incoming connections.".
Tick that box and restart your Skype then turn it off.
In Xampp control, click config, open Apache config file (httpd.conf) and set
Listen 80 to Listen 8080 or some port of your choice, stop / start the apache process and it'll resolve the conflict.
If you wish Apache to listen to port 80 only, you will need to stop conflicting Application or configure that app to use another port.

apache not running XAMPP

I am using Bitnami XAMPP on windows 7. It has been more than a year i'm using, but today all of a sudden it is showing Apache shutdown unexpectedly error.
Attempting to start Apache app... 9:43:46 PM [Apache] Status change
detected: running 9:43:47 PM [Apache] Status change detected:
stopped 9:43:47 PM [Apache] Error: Apache shutdown unexpectedly.
9:43:47 PM [Apache] This may be due to a blocked port, missing
dependencies, 9:43:47 PM [Apache] improper privileges, a crash, or
a shutdown by another method. 9:43:47 PM [Apache] Press the Logs
button to view error logs and check 9:43:47 PM [Apache] the Windows
Event Viewer for more clues 9:43:47 PM [Apache] If you need more
help, copy and post this 9:43:47 PM [Apache] entire log window on
the forums
Please note that Skype is not running, and i even tried changing the port to 81 by editing httpd.conf. Still I have unchecked "use port 80 and 443 or additional incoming connections"
After changing port number to 81 I went to Command prompt and used command
netstat -nab
I did not get any applications using port 81. I'm done restarting XAMPP and my computer.
Have you tried changing the port using the Xampp Control Panel?
Bitnami developer here.
It seems related to a blocked port. Try to change from the XAMPP Control Panel the both http and https ports in all the Apache configuration files.
To do that, press Config on the Apache section, and change the ports in httpd.conf and httpd-ssl.conf
You need also change the service port: Config (button on the right corner) -> Service and Ports Settings.
Click Netstat button if you want to see the currently used ports.
I hope it helps
David

Apache In XAMP is not working ! !

I keep getting the same error, I've tried changing the port via 'httpd.conf' many times, but it was useless, it keeps giving me this error. Any help is appreciated;
7:13:51 PM [Apache] Error: Apache shutdown unexpectedly.
7:13:51 PM [Apache] This may be due to a blocked port, missing dependencies,
7:13:51 PM [Apache] improper privileges, a crash, or a shutdown by another method.
7:13:51 PM [Apache] Check the "/xampp/apache/logs/error.log" file
7:13:51 PM [Apache] and the Windows Event Viewer for more clues
Apache needs to use default ports 80 (HTTP) and 443 (HTTPS / SSL), you have two options, either you change the port number used by apache or disable services that your system is using those ports. I propose a solution that works on windows 7.
you must disconnect the microsoft IIS server that listens on port 80 by default for this do the following:
-accesses the command line CMD in administrator mode
writes: net stop was
-will you answer yes
-you will answer a confirmation that the IIS has been disconnected
And you can start apache on port 80
You may also have busy port 443 for another service your system for it through the control panel in the xampp apache config button choose .. Apache (httpd-ssl.config) and you replace occurrences of the number 443 by any other number, 444 for example, is only necessary in the lines that are not comments (comment lines starting with #)
There are many reasons for this problem ..One of the main thing for this problem is about the port.If you are running another program like skype etc which is blocking port 80 or 443. then you've found your problem! Change apache's port settings to 81 and apache will work

Port 443 in use by "Unable to open process" with PID 4

I have a very strange problem with my Apache 2.4 working with Xampp 1.8.2 on Windows Server 2008 R2.
When I tried to start Apache server in XAMPP, an error message is shown:
[Apache] Problem detected!
[Apache] Port 443 in use by "Unable to open process" with PID 4!
[Apache] Apache WILL NOT start without the configured ports free!
[Apache] You need to uninstall/disable/reconfigure the blocking application
[Apache] or reconfigure Apache and the Control Panel to listen on a different port
However, the process with PID 4 is system! I've tried to restart my computer and it doesn't work.
I have installed Apache 2.4 via a tar.gz file sereral days ago, and uninstalled it. So, I don't think this behavior will cause the problem.
And here's the result using commond netstat -a -n -o | findstr 443
C:\Users\Administrator>netstat -a -n -o | findstr 443
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 4
TCP [::]:443 [::]:0 LISTENING 4
Can you tell me what to do?
Just change the sll port in httpd-ssl.conf file. It would be under C:\xampp\apache\conf\extra.
Find "443" and replace it with other values(e.g 8181), then start your apache again
I had the same problem: port-443-in-use-by-unable-to-open-process-with-pid-4
First I disabled the weather tile in Win* that apparently phones home to Redmond for updates after this showed on netstat list.
This didn't solve the problem. I looked at the post already here which mentioned VPNs, so
I went to Control Panel\Network and Internet\Network and Sharing Center and clicked on Change adapter settings
I clicked on Incoming Connections and right clicked on properties
The VPN click box at the bottom of the General tab was on, so I unchecked it
Under Users, I also unchecked a previous user I had allowed to copy some data weeks before
Then I clicked okay
Closed the control panel and restarted the XAMPP control panel
It fired right up without a problem.
Similarly, I experienced this:
Port 443 in use by "Unable to open process" with PID 6012!
When starting XAMPP Control Panel v3.2.1 for the first time.
In Task Manager I found that PID 6012 was Apache web server.
A copy of it was running in the background without the GUI,
and when I invoked the GUI it was trying to start another copy.
Killed the phantom copy and then XAMPP started up fine.
I didn't have to change any port settings.
Modify this
LocalDisk **>>** xampp **>>** apache **>>** conf **>>** httpd.conf
Line 58: Listen **80**
for this
Line 58: Listen **8080**
Modify this:
Line 220: ServerName localhost: **80**
for this
Line 220: ServerName localhost: **8080**
Modify this:
LocalDisk **>>** xampp **>>** apache **>>** conf >> extra **>>** httpd-ssl.conf
Line 36: Listen **443**
for this
Line 36: Listen **444**
Modify this:
Line 121: <VirtualHost _default_:**443**>
Line 125: ServerName www.example.com:**443**
For this
Line 121: <VirtualHost _default_:**444**>
Line 125: ServerName www.example.com:**444**
Simply run as Administrtor "xampp-control.exe"
I had the same problem. Another way to solve this problem when running XAMPP on Windows:
Open a CMD prompt and type in command:
net stop was /y
Run Dialog Box (press keys Win+R)
.. then type: services.msc
I then scrolled down to:
World Wide Web Publishing Service
Double clicked on it and clicked STOP (if this service status is Started)
3.Start Apache again with XAMPP :)
Link Ref: http://www.sitepoint.com/unblock-port-80-on-windows-run-apache/
Some process is using this port, so you can change the port that is used by xampp, to be able to use it.
For this job you have to do this:
1- Open httpd-ssl.conf in xampp\apache\conf\extra
2- Look for the line containing Listen 443
3- Change port number to anything you want. I use 4430. ex. Listen 4430.
4- Replace every 443 strings in that file with 4430.
5- Save the file.
Probably some process is using that port, i would guess you have another webserver running with ssl/tls already. You must trac down what process is using the port and shut it down. The fact that it does not help to restart your computer makes me think that you may find what you are looking for in msconfig. Try to have a look there, open prompt and write msconfig
post 443 is normaly used by secure http, => https
I have never used windows server but there could be some built in webserver that autostarts, have you ever installed another webserver?
Try use the command Netstat -a -n -o to see what process that is blocking. you can the process pid from the output.
The
Routing and RAS - service is your problem i guess look at this post
it does this, thats why its blocking:
SSTP tunneling protocol
Secure Socket Tunneling Protocol (SSTP) is a new form of virtual private networking (VPN) tunnel with features that allow traffic to pass through firewalls that block PPTP and L2TP/IPsec traffic. SSTP provides a mechanism to encapsulate PPP traffic over the SSL channel of the HTTPS protocol. The use of PPP allows support for strong authentication methods, such as EAP-TLS. The use of HTTPS means traffic will flow through TCP port 443, a port commonly used for Web access. Secure Sockets Layer (SSL) provides transport-level security with enhanced key negotiation, encryption, and integrity checking.
from tecsupport.ms
Below steps by sztupy worked for me
I went to Control Panel\Network and Internet\Network and Sharing Center and clicked on Change adapter settings
I clicked on Incoming Connections and right clicked on properties
The VPN click box at the bottom of the General tab was on, so I unchecked it
Under Users, I also unchecked a previous user I had allowed to copy some data weeks before
Then I clicked okay
Closed the control panel and restarted the XAMPP control panel
I simply went to the XAMMP config button in the XAMPP control panel GUI and clicked on Server and Port settings and I changed the SSL port value.
I had the same problem when I installed xampp on Windows 7. I installed Windows server and Web Deployment Agent Service (MsDepSvc.exe) which uses port 80. So I had an error PID 4 listening to port 80 when I ran apache.
Solution
Open task manager: (Ctrl+Shift+Esc) then find "MsDepSvc.exe" and disable it. Finally restart xampp
ref: http://www.honk.com.au/index.php/2010/10/20/windows-7-pid-4-listening-port-80-apache-cannot-star/
Here it was the "Work Folders" feature having been added on a Server 2012 R2. By default it is listening for HTTPS client requests on port 443 via the "System" process.
There is a Technet blog post explaining how to change that port number. Don't forget to add a corresponding firewall rule for your custom port and disable the existing one for port 443 though.
I got this same error and managed to fix it by closing Skype and running XAMP as Administrator, works perfectly now. So right click THE XAMP icon and click run as admin.
The port is being used by another process,
PID 4 means it is Windows System, you can open a cmd window with "super user/administrator" priviledges and write "net stop http", it will stop all the web services. Then check if it freed the port.
I had the same problem and it happened to be the "Routing and Remote Access Service". You open Services in the windows search, and then look for the specific service name. Change the startup of it to manual or automatic (whatever you decide).
Use some app like TCPView to help what port each App PID is using.
The origin of the problem seems to be Microsoft not knowing what the word disable Microsoft VPN means...
I ran task manager and looked for httpd.exe in process. Their were two of them running. I stopped one of them gone back to xampp control pannel and started apache. It worked.
I had the same problem and solved by doing following.
Go to Task Manager, click on services tab, order by pid's than if you find the related process, kill it otherwise, right click and click on show details, the process should be shown now. order by pid's than kill the related process.
I had this same problem with port 443, process id 4 and everything. For me it was not the VPN using the port, it was IIS. To fix this I opened up IIS and right clicked on my instance and stopped it. Then IIS Express(Or apache if you're using that) was able to use port 443. Hope this helps someone else.
I had a similar issue where port 443 was blocked by PID 4. After breaking my head for several hours I found the command netsh show urlacl which gave me an idea of the system process blocking the port.
To run command run cmd or windows shell in administrator mode.
netsh
http
show urlacl
I got response a which showed 443 was blocked by NT Service SSTPSvc Reserved URL
Response
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
With this information I followed the microsoft link to change the listening port for SSTP based vpn. https://support.microsoft.com/en-in/kb/947032
This resolved my port issue.
A simple way to fix this is to change the XAMP port to a random number.
The solution by "Mark Seagoe" worked for me too.
I got a message that "Port 443 in use by Unable to open process with PID 14508".
So i opened task manager and killed this process 14508. This was used by my previous xampp version and it was orphaned.
so no need to change any ports or anything, this is a simple two step process and it worked .
STEPS
Un-install apache(xampp) software from your windows.
Delete the xampp folder from c folder.
Delete the folder from recycle-bin to permanently delete the xampp folder
Restart your computer.
Finally install a clean copy of apache(xampp) software.
(By Engineer Rafiq Ahmad Qureshi)
qureshi.rafiq111#gmail.com

errors attempting to start Apache through XAMPP

This is what shows up when I attempt to run Apache without Apache service being activated:
>Status change detected: running
>Status change detected: stopped
>Error: Apache shutdown unexpectedly.
>This may be due to a blocked port, missing dependencies,
>improper privileges, a crash, or a shutdown by another method.
>Check the "/xampp/apache/logs/error.log" file
>and the Windows Event Viewer for more clues
This is what happens when I attempt to install the Apache service:
>Installing service...
>Apache Service detected with wrong path
>Change XAMPP Apache settings or
>Uninstall/disable the other service manually first
>Found Path: ERROR: Not Able To Open Service Manager
>Expected Path: "c:\xampp\apache\bin\httpd.exe" -k run service
>Successful!
...followed by attempting to start Apache after the service (failed) attempt:
>Attempting to start Apache service...
>System Error. Code: 5.
>Access is denied
Does anyone know what's going on here and/or are able to help troubleshoot?
I've already uninstalled and reinstalled with and without (zip file extraction) the installer.
It sounds like something may be running on port 80 already. What happens when you run
netstat -an |find /i "listening"
from the command line?
I had those messages as well. You probably have IIS and XAMPP clashing at port 80. You can either:
disable IIS (if you are not going to run the server regularly).
change XAMPP default ports.
change IIS default ports.
To change XAMPP default ports
Open your XAMPP\apache\conf\httpd.conf file and change the "80" ports to something else, people like "8080".
Open your XAMPP\apache\conf\extra\httpd-ssl.conf file and change the "443" ports to another number.
It should make both services run without conflicts.