(99)Cannot assign requested address: AH00072: make_sock: could not bind to address xx.xxx.xxx.xx:80 - apache

I am trying to configure access over Internet for xampp under Ubuntu. All works fine but when I add: Listen myip:80 in httpd.conf I cannot start apache server again. This is the error shown in /opt/lampp/logs/error_log:
(99)Cannot assign requested address: AH00072: make_sock: could not bind to address xx.xxx.xxx.xx:80
no listening sockets available, shutting down
AH00015: Unable to open logs
I cannot start Apache only if I add Listen xx.xxx.xxx.xx:80. If I change the Listen 80 to Listen 1234 or another port it runs ok. The problem seems to exist only if I add an IP.
I found this comment over the internet but I have no idea how to do it for xampp:
"The problem was the additional network cards were not configure with the addition IP's."
Also running from root netstat -ltnp | grep ':80' does not show anything.
I do not have Skype installed and it seems that there is no other process running on port 80.
Any ideas why this could be or how to fix?

I finally managed to get this working. I turned out I had not properly configured the forwarding of the IP from my outside address to the local IP address obtained by the Virtualbox.
I was using a Bridged Adapter, when I should have used a NAT connection and forward the outside IP to the Virtual box IP.
Hope this answer helps others with similar issue.

Related

Apache couldn't be started. Setting up Virtual Hosts. MAMP

I'm trying to setup Virtual Hosts on my mac using MAMP but I was not able to run my apache.
I already did this before by following this tutorial but still my attempts are unsuccessful.
I'm running OSX Yosemite and MAMP 4.5
Update 1:
I tried running sudo /Applications/MAMP/Library/bin/apachectl start
and it returns this
(48)Address already in use: make_sock: could not bind to address [::]:80
(48)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Update 2:
I tried renaming envvars_ and restarted the apache sudo apachectl restart still the apache is not running
Solved
Upon troubleshooting, what I did is force quit all the httpd processes on my activity monitor and restarted the mamp!!
Another server is already using port 80. You need to change the port of one of them. A port, like 80, can be used once per IP address.
Peter

Apache named virtual host not working after changing port

I have a jboss server and an apache web server on the same machine. Jboss has to stay listening on port 80, so I had to switch which port apache listened on. Before, when it was listening on port 80, everything worked fine. I set up a virtual host for a website I'm working on, and I was able to use the URL for that site as a I defined it in the virtual host file and my hosts file (I'm using Windows). After I changed the port it listened on, I get the following error:
Problem loading page: Unable to connect
I've restarted the server, restarted my machine, changed the port to several different numbers that weren't being used for anything else, and I even tried changing the localhost IP address from 127.0.0.1 to 127.0.0.2 to see if that would help, but none of this has worked. I changed the port in both httpd.conf and httpd-vhosts.conf, but nothing has really worked. I checked the IP address for the site with ping, and it showed that I'm using the right one. I would really appreciate some help because nothing is working.
Likely a local firewall issue. You should only need to change Listen, ServerName and <virtualhost>. You can use lsof or netstat to confirm the listening port.

Apache port 80 error

I'm trying to run a WAMP server, but i think Apache is getting port 80 blocked by something.
I did some research and found that in the event viewer it gives the error:
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address [::]:80 .
i looked up 0.0.0.0:80 on netstat -ao, which gave a PID of 4. The only problem is, there is nothing with a PID of 4 on my task manager. Does anyone know what might be taking up port 80, or how i might figure this out?
Thanks in advance.
EDIT:
Yes, i did deactivate the port from Skype, and it is forwarded correctly. This started happening i think when I installed IIS, but i thought i got rid of it.(yes i did disable it in control panel)
EDIT:
OK, i just changed the port in the config, all is well. Dont' know why i didn't think of that originally.
There are two ways to solving this problem.
1.If you want to run Apache in another port then:Replace in xampp/apache/conf/httpd.conf ServerName localhost:80 by ServerName localhost:81 At line 184. After that even it may not work.Then replace
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
by
#Listen 0.0.0.0:81
#Listen [::]:81
Listen 81
at line 45
2.Your port 80 is being used by the system or Skype. If by Skype then first quit Skype and run Apache. And you can restart Skype.
In Windows “World Wide Publishing" Service is using this port and stopping this service will free the port 80 and you can connect Apache using this port. To stop the service go to the “Task manager –> Services tab”, right click the “World Wide Publishing Service” and stop.
If you don't find there then Then go to "Run > services.msc" and again find there and right click the “World Wide Publishing Service” and stop.
If you didn't find “World Wide Publishing Service” there then go to
"Run>>resmon.exe>> Network Tab>>Listening Ports" and see which
process is using port 80
And from "Overview>>CPU" just Right click on that process and click "End Process Tree". If that process is system that might be a critical issue.
Some case Port 80 is being used by SYSTEM or other services. This like may helps you
http://openguider.wordpress.com/2014/01/31/how-to-solve-port-80-problems-on-windows/

Unable to change Apache port number in Xampp

I just downloaded Xampp server xampp-win32-1.8.2-0-VC9.zip file for windows and tried to start the apache server. But the server failed to start with the following message:
XAMPP now starts as a console application.
Instead of pressing Control-C in this console window, please use xampp_stop.exe
to stop XAMPP, because it lets XAMPP end any current transactions and cleanup
gracefully.
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:
80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
So clearly the port number 80 is already occupied.
So I went to the apache/conf/httpd.conf file and found the line:
#Listen 12.34.56.78:80
Listen 80
And changed the second line above to
Listen 8010
So the server must now start at port number 8010.But its instead starting on https default port number 443 and again giving the same error:
XAMPP now starts as a console application.
Instead of pressing Control-C in this console window, please use xampp_stop.exe
to stop XAMPP, because it lets XAMPP end any current transactions and cleanup
gracefully.
(OS 10048)Only one usage of each socket address (protocol/network address/port)
is normally permitted. : AH00072: make_sock: could not bind to address 0.0.0.0:
443
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
So how should I make the server run at the port number of my choice and why is my approach not working. As far as I can remember, the approach used to work on earlier versions of xampp but is not working now.
This is the link which helped me to change my port.
And this video too.
Turns out that Skype blocks XAMPP from running apache. Just close skype, open the server, and reopen skype. That fixed the issue for me.
If you are using Xampp, open this file httpd-ssl.conf and search for this entry Listen 443, change it to ,say, Listen 444
Then restart apache.
You need to change the port from the https-ssl.conf. From control panel of xamp config and apache (Httpd-ssl.conf) change the port.
I ran setup_xampp.bat and edited the port number from the control panes using the config button of apache. Then I found this line Listen 80 and change the port number to 81 by editing this line. This solved the problem for me.

Apache (xamp) and IIS cannot work together

I have XAMP 1.6.8 and IIS 5.0 installed on my PC(Windows XP SP3).
I'm unable to run them simultaneously. If IIS service is running, Apache throws the following error:
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Note the errors or messages above, and press the key to exit. 24...
Windows could not start the Apache2 on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 1.
Edit:
Apache runs on a different port 3128. And IIS (asp.net) usually runs on a different port.
"could not bind to address 0.0.0.0:80" means that, when it starts up, it tries to bind to port 80 on all available network interfaces. As IIS already has hogged one (or more) IPs to bind to, apache cannot get any and so will fail.
(I'm not sure if it will bind to any available IPs if you've configured it to bind to all, but one is already taken.)
So, configure Apache to bind to a different port (if you only have 1 IP address), or to bind to a different IP or range of IPs.
You do this by changing the binding. First find the Listen directive in the configuration file (httpd.conf) and change it. Currently it will say "Listen 80" (meaning all IPs), change it to say "Listen 192.168.0.2:80" to make it bind to that specified IP address.
You may have to edit the IIS configuration too to tell it to only bind to a single IP address too.
You need to configure either Apache or IIS to listen on a different port.
You can also use tcpview to check which ports are in use by which applications since it sounds like you have a conflict.
If you cant hit the arrow in centre of the circle, hit the arrow and then draw a circle around it. - I tried everything advised, uninstalled skype, no IIS running,added apache program to antivirus, still this did not solve the program
finally i changed apaches port from 80 to 82 look for Listen 80 in the httpd.conf and change this