Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error while running multiple instances of apache

Status
Not open for further replies.

vanibhat

Technical User
Jul 12, 2003
5
US
I am trying to run 2 instances of Apache with 2 different .conf files and with 2 different IPs.
though I am able to access my app from one instance the other instacne throw me an error
" Address already in use: make_sock: could not bind to port 80"

I am not able to figure out what went wrong as it is running with 2 different IP..


I appreciate if anyone can help me with this.

the apache version is 1.3.27 and it is on Linux Advanced server 2.4.9

Thanks,
Vani

 
You can't have two processes listening on the same port. What are you trying to accomplish, maybe it can be done without two processes. If not, you'll have to have them listen on different ports.
 
vanibhat,

You may be able to accomplish this with VirtualHosts and one Apache process, otherwise, as ericbrunson points out, you'll have to have your two Apache servers listening for different ports.

Wishdiak
A+, Network+, MCSA 2003 certified
 
Hai Vani,

Probale when you start 1st instace of apache, it bins the port 80 on BOTH addresses.

After you have start 1st instance, chek if apache respondes on the second IP too.
Or maybe the second instance is traing to use the same IP (first)...

BTW, how looks your Listen directive ?
Listen a_host/ip:80
Look for it in both config files.



PM

___
____
 
you don't need to have two apache instances for 2 ip's. you can have ip-based virtual host co-exist with name-based virtual host in one apache instance.

i know apache support above configuration within one instance. i am not sure if it will work if you run two separate instances and each listening on diff port.

the question here is there is only one httpd.conf there under /etc/httpd/conf unless you treak it to read the conf from different places.

~ Gary
 
Hi Marcel,
Yes ur answer makes sense butI am not able to find out where it is getting binded. Both instances are using separate IP address and nowhere I defined both the IPs together in the config files..
My Listen Directive is:
Listen x.x.x.x:80

Let me know what u think and thanks for ur help

Thanks,
Vani

 
try to start 1st instance of apache.
If port 80 is binded on both IPs, that means that in that conf file (1st one) you have something wrong, or at least not as you want.

If after 1st instance you have one IP:80 free, you should check carefully the 2nd conf file.

I dont know what else to say ... :(

___
____
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top