Forum Moderators: phranque
I am attempting to put my website onto a local machine for smoother maintenence but have hit a stumbling block with apache. I am attempting to bind a ip address and port using the the following commands:
Listen 12.23.45.78:80 # port num changed for example!
then have a virtual host setup later in the httpd.conf script yet everytime I initiate apache using
apachectl start
I get the following message
(99)Cannot assign requested address: make_sock: could not bind to address 12.34.56.78:80
no listening sockets available, shutting down
Unable to open logs
I am only new to linux and therefore unsure as to what commands I need to check out the other ports. However, nothing else network wise are running so there should be no clashes.
It is apache 2 and it is irrelevent what IP I put in as it spits them back without regard.
Any help would be happily received,
Justin
Welcome to WebmasterWorld!
A few commands that might help you out:
netstat -nltp #display programs and which ports they are listening on
ifconfig #display all network interfaces and ip addresses
ps -ef or ps -auwx #display ALL programs running
ps -ef ¦ grep httpd ¦ grep -v grep #Display any running instances of Apache (may need to use -auwx instead o -ef
Chad
... it is irrelevent what IP I put in ...
Hi Justin,
the IP address is not 'irrelevant', you can only let the apache bind to an address that is actually configured in the networking configuration settings on your box.
Another reason for trouble like this may be incompatible multiple LISTEN statements in the various config files.
For example, if there is a Listen 80 in httpd.conf and there is a Listen 10.1.2.13:80 elsewhere, then Apache will not be able to start, because it can't bind twice on the specified port 80.
... onto a local machine for smoother maintenence ...
If you don't need a specific and special setup, have you tried to not specify any address at all and let the apache just automatically bind by default to all those interfaces that are there?
Regards,
R.