I can't start WAMP 2.5 and XAMPP 7 but I can start WAMP 2.2 so its not port 80 issue ( I have listed all programs with netstat in cmd ). I have run httpd.exe in cmd but it didn't give me useful information on cmd ( nothing ).
Thanks for the answer
Change your port and try once
Edit your httpd.conf in XAMPP
Change this to
#Listen 12.34.56.78:80
Listen 80
this
#Listen 12.34.56.78:80
Listen 85
Then access your localhost useing
localhost:85/
If its same open cmd and type netstat -nab and check whats showing with port 80
Related
Apache24/conf/httpd.conf:
Port Listen 8080
I have set everything and tried port :80 and :8080, both doesn't work, what am I missing?
It worked properly now.
steps on how it worked
Legend: IPv4Address: 192.168.1.5 it should be different on your machine
cmd>ipconfig
copy IPv4Address
open Apache24/config/httpd.conf
line 59: Listen IPv4Address:8000
line 60: Listen 8000
line 218: ServerName IPv4Address:8000
save file
cmd> cd C:\Apache24\bin
cmd>./httpd for me httpd without ./httpd didn't work for some reason
refresh http://localhost:8000 or http://IPV4Address:8000 and it should work!
I think because I had run cmd>npm run dev ports 80 and 8080 were taken (although the server is offline now), luckily port 8000 is free.
Thanks #JamesYoung
I think you should check your computer process.
Below are the process check command
# for window
tasklist | findstr "httpd"
# for linux
ps -ef|grep httpd
I want to change the port which php-fpm are listen.
When I use osx, I can simply go php-fpm.conf, and change:
listen = 127.0.0.1:9000
to
listen = 127.0.0.1:9999
Now I'm use ubuntu, where can I change the port?
In Ubuntu 18.04 LTS, the file you looking for is /etc/php/7.2/fpm/pool.d/www.conf.
I get a apache error when I try access to anything folder or file, it returns Http Not found or Forbidden
I am trying restart and start apache
sudo apachectl restart
output:
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
I am trying stop it
sudo apachectl stop
output
httpd (no pid file) not running
I run sudo lsof -i:80
output:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 8904 root 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 9012 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 12726 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 12731 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 12732 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
Any idea to solve that ?
Useful information:
OS X El Capitan
In my Mac with Mojave (10.14.1) suddenly Apache couldn't give to serve ipv4 anymore, then gave me ERROR 403. I tried to kill all apache (sudo killall httpd)... checking de PID's on (sudo lsof | grep AMP | grep apache)... even didn't work... just ipv6 was available... still ERROR 403.
What works for me: Disable OSX's built-in Apache server.
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
After that:
sudo apachectl -k restart
Be happy :)
This one helped me:
Please edit httpd.conf file.
/usr/local/etc/httpd/httpd.conf
And replace
Listen 80
with
Listen 127.0.0.1:80
Restart apache
sudo apachectl -k restart
One of a couple of things could be happening:
You have a different version of apache running. You can make sure that you're using the correct one by running which apachectl. As an example, I also have two versions of apache /usr/sbin/apachectl and /usr/local/bin/apachectl
You're not running apachectl start as root, although it appears that you are.
You can run sudo lsof -i:80 to see what's binding that port currently
Try
sudo netstat -ltnp | grep ':80'
Output: tcp6 0 0 :::80 :::* LISTEN 1500/apache2
sudo kill 1500
sudo service apache2 restart
this error ocurs because apache server listen by deafult in port 80 so another service or program is using that port and apache canot start.
The solution is identify what program or service is using that port an then close, disable or unistall it.
to identify you can run netstat
sudo netstat -ltnp | grep ':80'
or
sudo lsof -i:80
in my case i have installed nginx and apache at the same time and both uses the port 80.
Temporary Solution: Stop or kill the service, program, etc.
Permanent Solution:
Change the port of apache server in config file
/etc/apache2/apache2.conf
Uninstall the service or program that uses port 80.
in my case I needed both so I decided to temporarily fix it by disabling the service with:
systemctl stop MyServiceName.service
If it is a service otherwise use kill command.
I had my configuration set up this way before as well, and ran into the same problem after I upgraded OSX this last time. I tried to find ANYTHING that was listening on either port 80 or 443 and couldn't find a thing anywhere. It took me a while but finally found another article that described a fix that actually worked. Keep in mind I'm using a homebrew install and have unloaded the default apache2 install that comes with Mac OSX.
Here's what I had before in my httpd.conf:
Listen 80
and I had something similar in ssl.conf
Listen 443 https
I had to alter my httpd.conf file to use a ServerName of localhost and Listen on 0.0.0.0:80, and same for ssl.conf but 0.0.0.0:443 https
httpd.conf:
ServerName localhost
Listen 0.0.0.0:80
and ssl.conf
Listen 0.0.0.0:443 https
Once I tried starting it again, everything was happy. Hope that helps! I would link to the article but I'm having trouble finding it again!
Well, it looks as if httpd is already running. To check run
lsof -i TCP:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 281 root 3u IPv6 19479 0t0 TCP *:80 (LISTEN)
....
So kill httpd and do what you want
If you've recently done a software update and you renamed or removed any of the default files in /etc/httpd/conf.d/ go have a look there. You might have duplicate directives because the package manager re-installed them.
In my case, I prefixed the files with numbers so I could control the load order... but an OS update re-installed the original files so
I had two files with "Listen 443" in them which conflicted and wasn't caught by the syntax check. Removing the os files fixed the issue.
(This time I left them but made them empty so the conflict will be displayed on re-install or update)
I've installed wampserver. Yet it is always as a red tray icon.
Icon tooltip msg: local server - None of 2 services running.
Port 80 is not occupied; checked with Apache ► Service ► Test port 80:
Warning: chmod(): Permission denied in C:\wamp\scripts\config.inc.php on line 68
Impossible to modify the file C:\WINDOWS\system32\drivers\etc\hosts to be writab
le
The file C:\WINDOWS\system32\drivers\etc\hosts is not writable
***** Test which uses port 80 *****
===== Tested by command netstat filtered on port 80 =====
Test for TCP
Port 80 is not found associated with TCP protocol
Test for TCPv6
Port 80 is not found associated with TCP protocol
===== Tested by attempting to open a socket on port 80 =====
Your port 80 is not actually used.
Apache ► Service administration ► Install Service issues in a cmd window:
pressing Enter shuts the window down, nothing happens. Waiting gives no profit either.
What's wrong?
Update
Had attempts to change port number for Apache (both to 81 and to 8080) in httpd.conf:
Listen 0.0.0.0:8080
Listen [::0]:8080
ServerName localhost:8080
Checked whether IIS is runnig => No!
.
Doesn't help.
I had the same problem, and the solution was too simple:
"Run it as Administrator."
Without changing port or other additional configuration ...
You can do it by right clicking on the program icon and in the menu that appears, select the option "Run as administrator".
It is also possible to automate this process, by right clicking on the program icon and selecting "Properties".
Once the properties window is open, we go to the "Compatibility" tab. In the "Configuration" area we mark the option "Run this program as administrator".
Then we will click on "Apply" and then on "OK".
Ready! From now on, every time we run the program it will do so in administrator mode.
(Today, May 8, 2019, I see that #riggsfolly has responded in a comment much earlier than me. My recognition.)
I had same problem, tried change port and so on, but finally I installed older version (2.5 I think) and it works without any change of setting.
I think that IIS in install your windows
Change your port on httpd.conf
for example 81
Listen 0.0.0.0:80
Listen [::0]:80
ServerName localhost:80
to
Listen 0.0.0.0:81
Listen [::0]:81
ServerName localhost:81
and restart apache service
Open the httpd.exe in administration manually. The file is in wamp64\bin\apache\apache2.4.23\bin\. Then it works.
You can try this
Uninstall the wamp server
Click on the downloaded wamp file , and select Run as Administrator
Read and follow the Information Window that will pop up after one or two steps
Complete the installation
Still ? Check out http://forum.wampserver.com/read.php?2,134915
It can happen because of one of the three reasons:-
1) Missing VC++ installation: Install All versions of VC++ redistribution packages VC9, VC10, VC11, VC13, VC14 and VC15.. If you have a 64-bit Windows, you must install both 32 and 64bit versions of each VisualC++ package, even if you do not use Wampserver 64 bit.
2) You forgot to provide Admin Privileges to WAMP Server : Launch and Install with the "Run as administrator" option, very important.
3) WAMP, IIS and Skype fighting over same port :
Close Skype or force not to use port 80: http://forum.wampserver.com/read.php?2,134915
Disable IIS: http://forum.wampserver.com/read.php?2,134915
I have downloaded PhpStorm and set all the required configuration. When I try to run the project on port 80, I get this error.
Failed to listen on localhost:80 (reason: Permission denied)
And when I try to use any other ports like 8080 ,I get this error.
Failed to listen on localhost:8080 (reason: Address already in use)
I have tried several different random ports. But I get this already in use error all the time.
I have xampp installed. And when I try to run the url in browser with port , it works fine. The problem is that it isn't working on PhpStorm.
I am stuck.
The errors description are very clear:
The error:
Failed to listen on localhost:80 (reason: Permission denied)
You really don't have permission to use this port; so you need to change your user or use sudo to run your application.
and the error:
Failed to listen on localhost:8080 (reason: Address already in use)
The address that you are trying to use localhost:8080 is already in use by other processes/software.
Normally, if you change the port will solve the problem: (eg. 9090).
But, if you want to know which program is using the port 80 in Unix (Mac OSX, Linux), you can use the lsof command:
To do this:
In the terminal, you need to use:
sudo lsof -i :80
That will result something like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 82 root 4u IPv6 0x763617bed21ecc33 0t0 TCP *:http (LISTEN)
httpd 226 _www 4u IPv6 0x763617bed21ecc33 0t0 TCP *:http (LISTEN)
On this result, we can see that the /usr/sbin/httpd is listening on port 80 on my machine, which is the Apache server.
To know the details of the process that is listening on port 80 you can use the ps command:
ps u PID_of_target_process
that will return a result similar to this:
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 82 0.0 0.0 2463324 4248 ?? Ss 9:48AM 0:00.93 /usr/sbin/httpd -D FOREGROUND
To kill the process by the PID you can use the kill command, like the following:
sudo kill -KILL PID_of_target_process
After you kill the process the port will be available again.
The PHPStorm / Intellij built-in web server listens on port 63342 by default.
https://confluence.jetbrains.com/display/PhpStorm/Using+the+Built-in+Webserver+in+PhpStorm
You can set the port in the Run/Debug Configurations under PHP Built-in Web Server:
Stop your Apache server from XAMPP.
Run your PHPStorm with ROOT privileges.
If running PHPStorm is showing your the same error saying Failed to listen on localhost:8080 (reason: Address already in use). The ports 80 is used by any other application. Try checking your used ports with a free tools out there. Stop the process using port 80 and try running the phpstorm.
Xampp for Mac
if you find you cannot get apache to run and you have
no apache web server already running!
......in terminal type.....
sudo apachectl stop
......then run......
sudo /Applications/XAMPP/xamppfiles/bin/apachectl start
.....if you have a port not specified you need to go into
applications/xampp/xamppfiles/etc/httpd.conf and on line 52 or 53
you have a ip or localhost you can set.
adding a port number
add :port number example 192.168.64.2:80 or localhost:80
save and run sudo /Applications/XAMPP/xamppfiles/bin/apachectl start }}}}}}}}}}}}}